Answers for "set update in python"

1

.update python

z = {1: 'One', 2: 'Two'}
x = {0: 'zero', 1: 'one'}
x.update(z) # adds anything new to the dict
print(x)
{0: 'zero', 1: 'One', 2: 'Two'}
Posted by: Guest on January-23-2021

Python Answers by Framework

Browse Popular Code Answers by Language