Advertisement
robjones90

Untitled

Jul 28th, 2022
927
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.22 KB | None | 0 0
  1. ItemsList = []
  2.  
  3. while True:
  4.     new_item = input("Prompt")
  5.     if new_item in ItemsList:
  6.         ItemsList.remove(new_item)
  7.         print('\n' + str(ItemsList))
  8.     else:
  9.         ItemsList.append(str(new_item))
  10.  
  11.         print('\n' + str(ItemsList))
  12.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement