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 -- http://mail.python.org/mailman/listinfo/python-list