shared reference please [without bug]
Egbert Bouwman
egbert at bork.demon.nl
Mon Oct 2 10:46:11 EDT 2000
There is a minor bug in my question, so here is a second version:
On Mon, Oct 02, 2000 at 04:34:53PM +0200, Egbert Bouwman wrote:
> Is there a way to make a list element and and a variable always
> show the same value, even if that value is a simple number or string ?
> Eg
> >>> a = [100,200]
> >>> weight = a[0]
> >>> length = a[1]
> >>> length = 222
> >>> a
> [100, 222] # intended result
> and vice versa:
> >>> a[0] = 99
> >>> weight
> 99 # intended result
> egbert
--
Egbert Bouwman - Keizersgracht 197 II - 1016 DS Amsterdam - 020 6257991
========================================================================
More information about the Python-list
mailing list