Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- message = []
- command = input().split()
- while not command[0] == "end":
- if command[0] == "Chat":
- message.append(command[1])
- elif command[0] == "Delete":
- if command[1] in message:
- message.remove(command[1])
- elif command[0] == "Edit":
- if command[1] in message:
- message[message.index(command[1])] = command[2]
- elif command[0] == "Pin":
- if command[1] in message:
- message.remove(command[1])
- message.append(command[1])
- elif command[0] == "Spam":
- for el in range(1, len(command)):
- message.append(command[el])
- command = input().split()
- [print(el) for el in message]
Add Comment
Please, Sign In to add comment