Revision: 6869 Author: cosoleto Date: 2009-05-11 00:35:02 +0000 (Mon, 11 May 2009)
Log Message: ----------- generate_user_files: Use enumerate(), a bit shorter.
Modified Paths: -------------- trunk/pywikipedia/generate_user_files.py
Modified: trunk/pywikipedia/generate_user_files.py =================================================================== --- trunk/pywikipedia/generate_user_files.py 2009-05-11 00:31:39 UTC (rev 6868) +++ trunk/pywikipedia/generate_user_files.py 2009-05-11 00:35:02 UTC (rev 6869) @@ -20,12 +20,9 @@
message += ": "
- n = 0 + for n, i in enumerate(clist): + print ("%d: %s" % (n + 1, i))
- for i in clist: - n += 1 - print ("%d: %s" % (n, i)) - while True: choice = raw_input(message)
pywikipedia-svn@lists.wikimedia.org