[Tutor] dynamic arrays?
mehgcap at gmail.com
Mon Sep 27 17:32:32 CEST 2010
One thing I have never much liked about Python is its need for
specifically sized arrays and lack of a dynamic, array-like data
structure. For example, the following fails with a "list assignment
index out of range" error:
for l in open("file.txt", "r"):
Is there something in Python I am missing that would let the above
work? I am hoping that my annoyance at the apparent lack of such a
thing is unfounded. BTW, I know why the above throws that exception.
Have a great day,
Alex (msg sent from GMail website)
mehgcap at gmail.com; http://www.facebook.com/mehgcap
More information about the Tutor