obj2 = ojb1 = range(len(somelist))
David Bear
iddwb at moroni.pp.asu.edu
Thu Jan 31 17:28:49 EST 2002
I wanted to create 2 distinct lists that were derived from range
function. rather that doing
obj1 = range(len(somelist))
obj2 = range(len(somelist))
I wanted to do
obj2 = ojb1 = range(len(somelist))
Yet, both names point to the same object -- they're not two objects.
Is there some other syntax that I could use to avoid having to call
range(len(list)) twice and still create two objects?
--
David Bear
College of Public Programs/ASU
480-965-8257
...the way is like water, going where nobody wants it to go
More information about the Python-list
mailing list