How to empty a dictionary in Python

How to empty a dictionary in Python

Enthought

55 лет назад

786 Просмотров

In this short tutorial, you will learn how to empty out a dictionary in Python using the clear method. Want to learn more? See our Python classes at https://goo.gl/2NthG9.

Read the documentation for dictionaries here: https://docs.python.org/3/library/stdtypes.html#mapping-types-dict

Code from video:
*****************
employees = {1: 'michael', 2: 'eric', 3: 'michael'}
employees.clear()
employees

Connect with us!
*****************
https://twitter.com/enthought
https://www.facebook.com/Enthought/
https://www.linkedin.com/company/enthought

Тэги:

#python #tutorial #programming #how-to #dict #dictionary
Ссылки и html тэги не поддерживаются


Комментарии: