Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # OrderedDict.py
- d={}
- d['p'] = 'P'
- d['y'] = 'Y'
- d['t'] = 'T'
- d['h'] = 'H'
- d['o'] = 'O'
- d['n'] = 'N'
- print [[k,v] for k,v in d.items()]
- print
- import collections
- d = collections.OrderedDict()
- d['p'] = 'P'
- d['y'] = 'Y'
- d['t'] = 'T'
- d['h'] = 'H'
- d['o'] = 'O'
- d['n'] = 'N'
- print [[k,v] for k,v in d.items()]
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement