Advertisement
jumboframe

Untitled

Jul 7th, 2018
169
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.34 KB | None | 0 0
  1. in_line=input()
  2. dict = {}
  3. while in_line != "end":
  4.     params = in_line.split(" = ")
  5.     name = params[0]
  6.     value = params[1]
  7.     if value.isdigit():
  8.         dict[name] = int(value)
  9.     else:
  10.         if dict.get(value):
  11.             dict[name] = dict[value]
  12.     in_line = input()
  13. for key in dict:
  14.     print(f"{key} === {dict[key]}")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement