Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- message = []
- line = input()
- while not line == "end":
- command = line.split()
- 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])
- line = input()
- [print(el) for el in message]
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement