bl00dt3ars

3

Jul 10th, 2021 (edited)
155
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.69 KB | None | 0 0
  1. message = []
  2. command = input().split()
  3.  
  4. while not command[0] == "end":
  5.     if command[0] == "Chat":
  6.         message.append(command[1])
  7.     elif command[0] == "Delete":
  8.         if command[1] in message:
  9.             message.remove(command[1])
  10.     elif command[0] == "Edit":
  11.         if command[1] in message:
  12.             message[message.index(command[1])] = command[2]
  13.     elif command[0] == "Pin":
  14.         if command[1] in message:
  15.             message.remove(command[1])
  16.             message.append(command[1])
  17.     elif command[0] == "Spam":
  18.         for el in range(1, len(command)):
  19.             message.append(command[el])
  20.     command = input().split()
  21.            
  22. [print(el) for el in message]
Add Comment
Please, Sign In to add comment