Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- journal = input().split(', ')
- command_input = input()
- while command_input != 'Craft!':
- args = command_input.split(" - ")
- command = args[0]
- if command == 'Collect':
- item = args[1]
- if not item in journal:
- journal.append(item)
- if command == 'Drop':
- item = args[1]
- if item in journal:
- journal.remove(item)
- if command == 'Combine Items':
- item = args[1].split(':')
- text = item[0]
- text1 = item[1]
- if text in journal:
- place = journal.index(text)
- journal.insert(place + 1, text1)
- if command == 'Renew':
- item = args[1]
- if item in journal:
- place = journal.index(item)
- journal.pop(place)
- journal.append(item)
- command_input = input()
- print(", ".join(journal))
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement