Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/usr/bin/env python
- import collections
- with_class = collections.namedtuple(
- 'Person', 'name class age gender',
- rename=True)
- print with_class._fields
- two_ages = collections.namedtuple(
- 'Person', 'name age gender age',
- rename=True)
- print two_ages._fields
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement