Copmlex structures....
Dmitry S. Makovey
dmitry at athabascau.ca
Fri Mar 22 15:58:47 EST 2002
Hi. The problem itself is - I want to use complex structures like described
below, but i want it another way....
01. >>> f={}
02. >>> f['name']='dimon'
03. >>> f['age']=20
04. >>> a=[]
05. >>> a.append(f)
06. >>> print a
07. [{'age': 20, 'name': 'dimon'}]
08. >>> f['age']=22
09. >>> print a
10. [{'age': 22, 'name': 'dimon'}]
I don't like result in the last like I've expected to have [{'age': 20,
'name': 'dimon'}], how could i do this?
I know that it must be as simple as using something like b[:], but what?
WBW,
Dmitry S. Makovey
More information about the Python-list
mailing list