text_plain_output_1.png
mydict = {}

mydict.keys()

mydict.values()

mydict.update({'c': 'cat', 'd': 'dog', 'e': 'elephant'})

mydict.keys()

mydict.values()

mydict.items()

mydict.get('a')

mydict.get('g')

mydict.pop('e')

mydict.keys()

mydict.popitem()

mydict.clear()

keys = {'India', 'Srilanka', 'Bangladesh', 'Singapore', 'Japan'}
val = 'Asia'

countries = mydict.fromkeys(keys, val)

countries.setdefault('USA', None)

countries.setdefault('India')

countries.update({'Nigeria': 'Africa', 'Egypt': 'Africa', 'Ethiopia': 'Africa', 'Kenya': 'Africa'})

list(countries.keys())

list(set(countries.values()))

'Canada' in countries