Newbie question: Dictionary of lists

Jason Stokes jstok at bluedog.apana.org.au
Thu Feb 17 01:27:31 CET 2000


Kossmann, Bill wrote in message

># Short test file (16000 lines in production)
>histFile = open("2000.txt", "r")
>for histLine in histFile.readlines():
>   histRcd = string.split(histLine, ",")
>
># Key is our cost centre code
>   dictionaryKey = histRcd[0]+histRcd[1]+histRcd[2]+histRcd[3]


Just a nit:  This is in the scope of the for loop.  The comment
should be indented.






More information about the Python-list mailing list