Exercise 1

key 和 value不同的性质和用法

animals = {'a': 'aardvark', 'b': 'baboon', 'c': 'coati','d':'donkey'}

>>> 'baboon' in animals
>>> False

>>> 'b' in animals
>>> True

>>> 'donkey' in animals.values()
>>> True

results matching ""

    No results matching ""