Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- entrance = input()
- my_dict = {}
- while entrance.lower() != 'end':
- key = entrance.split(' = ')[0]
- value = entrance.split(' = ')[1]
- if value in my_dict:
- my_dict[key] = my_dict[value]
- elif value.isnumeric():
- my_dict[key] = value
- entrance = input()
- for key, value in my_dict.items():
- print(f'{key} === {value}')
Advertisement
Add Comment
Please, Sign In to add comment