Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- input_items = input().split(", ")
- while True:
- command = input().split(" - ")
- if "Craft!" in command:
- break
- item = command[1]
- if "Collect" in command and item not in input_items:
- input_items.append(item)
- elif "Drop" in command and item in input_items:
- input_items.remove(item)
- elif "Combine Items" in command:
- item_split = item.split(":")
- if item_split[0] in input_items:
- index_old = input_items.index(item_split[0])
- input_items.insert(index_old + 1, item_split[1])
- elif "Renew" in command and item in input_items:
- input_items.remove(item)
- input_items.append(item)
- print(", ".join([s for s in input_items]))
Advertisement
Add Comment
Please, Sign In to add comment