Dictionary Manipulation

PHOTO EMBED

Tue Nov 23 2021 11:18:49 GMT+0000 (Coordinated Universal Time)

Saved by @Sourabh ##dictionary

# Definition of dictionary
europe = {'spain':'madrid', 'france':'paris', 'germany':'berlin', 'norway':'oslo' }

# Add italy to europe
europe['italy'] = 'rome'

# Print out italy in europe
print('italy' in europe)

# Add poland to europe
europe['poland'] = 'warsaw'

# Print europe
print(europe)
content_copyCOPY

Updating dictionaries in python

https://campus.datacamp.com/courses/intermediate-python/dictionaries-pandas?ex=6