Python Tutorial 11: Python Dictionaries

preview_player
Показать описание
Dictionaries are mutable data types in Python like lists. Here is a complete tutorial on Python dictionaries.

==================
Sections and Timeline
==================
1) Introduction - 0:14
2) Declaring a dictionary - 1:44
3) Rules for declaring keys and values - 2:27
4) Accessing elements from a dictionary - 4:23
5) Adding key value pairs to dictionary - 5:48
6) items( ) method for iterating over dictionaries - 8:22
7) keys( ) and values() methods in dictionaries - 11:41
8) get( ) method in dictionaries - 13:00
9) Removing elements from a dictionary - 14:30
10) Update a dictionary with another dictionary - 17:41
Рекомендации по теме
Комментарии
Автор

Love the way you explain and it goes in my head. Thank you.

cdyz
Автор

Thanks again. We love your tutorials in Brazil

diegogomes
Автор

Hi - It was demonstrated to access/deleted elements in a nested dictionary. How do you add though? Im coming across a lot of good information on nested dictionaries but nothing beyond nested complex dictionaries to add elements>

for example::
users = {
1: {'nissan': {'altima':{'datagy', 'mi primer carro'}, 'maxima':'camry'}},
2: {'Toyota': 'Car to be sold ', 'Supra': 'Government'},
'aws': {'s3':'simple storage services', 'encryption':{'cmk', 'total'}, 'bucket':{'can have many objects', 'policies attached to it'}},
3: {'flavor':"Cookies and cream", "price":"$8"}
}
How do i add to users[2][aws][encryption] = ('new value") ?

enterboy