View Single Post
Khertan's Avatar
Posts: 1,012 | Thanked: 817 times | Joined on Jul 2007 @ France
#26
Also :

- Avoid while loop when you can use a "for foo in foo_list"
- use xrange instead of range (removed in python 3 so it s not really a good idea for compatibility)

ah and of course, Read this : http://wiki.python.org/moin/PythonSpeed/PerformanceTips