Advertisement
Guest User

Untitled

a guest
Oct 20th, 2019
101
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.59 KB | None | 0 0
  1. initial_loot = input().split('|')
  2.  
  3. command = input()
  4.  
  5. stolen = []
  6.  
  7. def ap(token):
  8. store = []
  9. store = [tokens[i] for i in range(1, len(tokens)) if tokens[i] not in store]
  10. return store
  11.  
  12. while command != 'Yohoho!':
  13. tokens = command.split()
  14. if tokens[0] == 'Loot':
  15. for i in ap(tokens):
  16. if i not in initial_loot:
  17. initial_loot.insert(0, i)
  18. elif tokens[0] == 'Drop':
  19. idx = int(tokens[1])
  20. initial_loot.append(initial_loot[idx])
  21. del initial_loot[idx]
  22. elif tokens[0] == 'Steal':
  23.  
  24. command = input()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement