d={} (d['a'],d['o'],d['g'])=("alpha","omega","gamma") print d for k in sorted( d.keys() ): print k," ",d[k] print d
Output:
{'a': 'alpha', 'g': 'gamma', 'o': 'omega'} a alpha g gamma o omega {'a': 'alpha', 'g': 'gamma', 'o': 'omega'}
d={} (d['a'],d['o'],d['g'])=("alpha","omega","gamma") print d for k in sorted( d.keys() ): print k," ",d[k] print d
{'a': 'alpha', 'g': 'gamma', 'o': 'omega'} a alpha g gamma o omega {'a': 'alpha', 'g': 'gamma', 'o': 'omega'}
0 comments:
Post a Comment