On 06/06/2012 19:28, Jon Clements wrote:
On 06/06/12 18:54, Prasad, Ramit wrote:data= [] for index in range(N, 1): # see Chris Rebert's comment with open('data%d.txt' % index,'r') as f: data.append( f.readlines() )I think "data.extend(f)" would be a better choice.
.extend does something different, and "range(N, 1)" is an empty range if N > 0. -- http://mail.python.org/mailman/listinfo/python-list