breadth first search
Chris McDonough
chrism at plope.com
Wed Feb 8 12:36:33 EST 2006
Peter Otten wrote:
> Chris McDonough wrote:
>
>>> Can Python
>>> create list dynamically, I want to implement a program which will read
>>> data from a file and store each line into a list, is this possible?
>> L = []
>> [L.append(line) for line in (open('filename.txt')]
>
> Why would you create two lists, one filled only with None entries just to
> throw it away immediately? Don't use list comprehensions just because you
> can.
Yes, of course. Thank you. I didn't mean to offend your sensibilities.
I'm not retarded *every* day, just today. ;-)
- C
More information about the Python-list
mailing list