Python 3, 136 bytes
def f(s,g={}):
for k in filter(lambda a:'='in a,s):
*v,l=k.split('=')
for r in v:
try:g[r]=eval(l)
except:g[r]=g[l]
return g
Python really isn't my strong suit for golfing :/ Note the use of tabs rather than spaces, so the indentation levels are still a single byte each. Takes input as a list of lines with assignments separated by = (no spaces) and returns a dictionary of variables and values
caird coinheringaahing ♦
- 50.9k
- 11
- 133
- 364