Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- input_line = input()
- dictionary = {}
- while not input_line == "end":
- data = [item for item in input_line.split(" = ")]
- if data[1].isdigit():
- dictionary[data[0]] = int(data[1])
- else:
- if data[1] in dictionary:
- dictionary[data[0]] = int(dictionary.get(data[1]))
- input_line = input()
- for key in dictionary:
- print("{0} === {1}".format(key, dictionary[key]))
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement