> You could go: > > def makefunction(): > theletters = uppercase[:26] + ' ' > copyof = list(theletters) # reason: to allow a shuffle > shuffle(copyof) > return dict(zip(theletters, copyof))
I like it. Hadn't considered zipping a string with a list:
>>> zip('abc',['r','s','t'])
[('a', 'r'), ('b', 's'), ('c', 't')]
Kirby
_______________________________________________
Edu-sig mailing list
[email protected]
http://mail.python.org/mailman/listinfo/edu-sig
