|
|
|
|
|
by shadowmatter
4887 days ago
|
|
Good list. My only thoughts: Prefer itertools.izip instead of zip to avoid materializing a new list. Appending the comma operator to the print statement suppresses the newline character and appends a space instead, which is how print 1, "world" works. The only tip I'd add is using mapping keys in string formatting operations: >>> d = {'cow': 'moo'}
>>> print 'the cow says %(cow)s' % d
the cow says moo
|
|