On Fri, May 22, 2009 at 11:00 AM, Gökhan SEVER <gokhanse...@gmail.com> wrote: > Because in this case serialc is an numpy array. Since loadtxt returns a > numpy-array. Furthermore > > locals()['serialc_bin' + str(i+1)] creates a dictionary key (that's what I > use the term "variable-like") serialc_bin1, serialc_bin2, ... not > serialc_bin[0] with indexes.
A name (or variable as you call it) is not a dictionary key. The contents of the name may be. A list can not be a dictionary key. However, a list element can be (or not, if the element itself is mutable) You gain nothing by creating all these names. -- http://mail.python.org/mailman/listinfo/python-list