Skip to content

Instantly share code, notes, and snippets.

@matyasfodor
Created July 16, 2017 20:45
Show Gist options
  • Save matyasfodor/75af6aa56bfea48e9c11e06e18fbb48a to your computer and use it in GitHub Desktop.
Save matyasfodor/75af6aa56bfea48e9c11e06e18fbb48a to your computer and use it in GitHub Desktop.
nt = namedtuple('X', 'a b')
mydict = {}
dict[nt(1, 2)] = 5
dict[nt(1, 2)]
# 5
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment