Re: [Tutor] Dictionary to variable copy

2011-12-08 Thread Alan Gauld
On 08/12/11 09:03, sunil tech wrote: /Can i copy the content if a dictionary in to another variable, with out any link between the dictionary & the variable? if so, please teach. Yes, but they will both refer to the same object. But the two references will be entirely independant: D = {1:2,3:

Re: [Tutor] Dictionary to variable copy

2011-12-08 Thread Timo
Op 08-12-11 10:03, sunil tech schreef: /Can i copy the content if a dictionary in to another variable, with out any link between the dictionary & the variable? / Have a look at the copy module [1], or use the builtin dict.copy() method. Cheers, Timo [1] http://docs.python.org/library/copy.htm