Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- initial_loot = input().split('|')
- command = input()
- stolen = []
- def ap(token):
- store = []
- store = [tokens[i] for i in range(1, len(tokens)) if tokens[i] not in store]
- return store
- while command != 'Yohoho!':
- tokens = command.split()
- if tokens[0] == 'Loot':
- for i in ap(tokens):
- if i not in initial_loot:
- initial_loot.insert(0, i)
- elif tokens[0] == 'Drop':
- idx = int(tokens[1])
- initial_loot.append(initial_loot[idx])
- del initial_loot[idx]
- elif tokens[0] == 'Steal':
- command = input()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement