How to add an item to a dictionary in Python

Опубликовано: 06 Октябрь 2024
на канале: Enthought
32,882
177

In this short tutorial, you will learn how to insert an item into a dictionary in Python. Want to learn more? See our Python classes at https://goo.gl/oKSaBU.

Read the documentation for dictionaries here: https://docs.python.org/3/library/std...

Code from video:
*****************
employees = {1: 'michael', 2: 'eric'}
employees[3] = 'michael'
employees

Connect with us!
*****************
  / enthought  
  / enthought  
  / enthought