#The copy method returns a new dictionary with the same key-value pairs (a "shallow #copy," since the values themselves are the same, not copies):x = {'username': 'admin', 'machines': ['foo', 'bar', 'baz']}y = x.copy()y['username'] = 'mlh'y['machines'].remove('bar')print yprint x
Name (required)
email (will not be published) (required)
Website