19 August 2020
Code
# Create dictionary using tuples
x = dict([
('animal', 'bear'),
('bird', 'sparrow')
])
# Output
print(x)
print(type(x))
{'animal': 'bear', 'bird': 'sparrow'}
<class 'dict'>
Any errors in code above?
Please send a message.