Code: Alles auswählen
DctLst = { 'x': [1,2,3,4,5], 'y':[100,200,300], 'z':0.01}
DctLstCopy = DctLst.copy()
DctLstCopy['x'].append(6)
DctLstCopy['z'] = 0
print "DctLst =",DctLst
print "DctLstCopy =",DctLstCopy
Code: Alles auswählen
DctLst = {'y': [100, 200, 300], 'x': [1, 2, 3, 4, 5, 6], 'z': 0.01}
DctLstCopy = {'y': [100, 200, 300], 'x': [1, 2, 3, 4, 5, 6], 'z': 0}