Skip to content

Instantly share code, notes, and snippets.

@greggyNapalm
Last active December 12, 2015 09:49
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save greggyNapalm/4754553 to your computer and use it in GitHub Desktop.
Save greggyNapalm/4754553 to your computer and use it in GitHub Desktop.
#var 1
>>> a = ['34', 'Brown']
>>> b = {}
>>> b[a[0]] = a.append(0)
>>> b
{'34': None}
#var2
>>> a = ['34', 'Brown']
>>> a.append(0)
>>> b[a[0]] = a
>>> b
{'34': ['34', 'Brown', 0]}
# Is it possible to do L10-L11 calls in one line?
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment