obj2 = ojb1 = range(len(somelist))
Tom Jenkins
tjenkins at devis.com
Thu Jan 31 20:16:55 EST 2002
On Thu, 2002-01-31 at 20:16, Cromwell, Jeremy wrote:
> -----Original Message-----
> From: Tom Jenkins [mailto:tjenkins at devis.com]
>
> i didn't think this was going to work but hey the interpreter was there
> <wink>
> >>> l1 = l2[:] = range(len(somelist))
> >>> print l1, l2
> [0, 1, 2, 3, 4] [0, 1, 2, 3, 4]
> >>> print id(l1), id(l2)
> 135566380 135560684
> >>>
>
> --
>
> At some point Tom must have defined l2 as a list.
> Here's a listing from scratch
WHOOPS! yep scrolling up in my scratch interpreter i see that i did have
l1, l2, l3 already defined. I'm sure it was a plot by th
--
Tom Jenkins
Development InfoStructure
http://www.devis.com
More information about the Python-list
mailing list