Python Tutorial for Beginners 16 - Python Dictionary

preview_player
Показать описание
In this video I am going to show What are Dictionaries and How to use Dictionaries in python. So What are Dictionaries in python?
dictionary in python is an associative list or a map.
We can think if dictionary as a list of pairs, where the first element of the pair, the key, is used to retrieve the second element, the value.Hence we map a key to a value.Dictionaries are Python’s most powerful data collection. Dictionaries allow us to do fast database-like operations in Python.Dictionaries are like Lists except that they use keys instead of Index to lookup values.

The list of all functions which can be use with Python Dictionaries :
['__class__', '__contains__', '__delattr__', '__delitem__', '__dir__', '__doc__', '__eq__', '__format__', '__ge__', '__getattribute__', '__getitem__', '__gt__', '__hash__', '__init__', '__iter__', '__le__', '__len__', '__lt__', '__ne__', '__new__', '__reduce__', '__reduce_ex__', '__repr__', '__setattr__', '__setitem__', '__sizeof__', '__str__', '__subclasshook__', 'clear', 'copy', 'fromkeys', 'get', 'items', 'keys', 'pop', 'popitem', 'setdefault', 'update', 'values']

#PythonTutorialforBeginners #ProgrammingKnowledge #LearnPython #PythonCourse
★★★Top Online Courses From ProgrammingKnowledge ★★★

★★★ Online Courses to learn ★★★

★★★ Follow ★★★

DISCLAIMER: This video and description contains affiliate links, which means that if you click on one of the product links, I’ll receive a small commission. This help support the channel and allows us to continue to make videos like this. Thank you for the support!
Рекомендации по теме
Комментарии
Автор

Dictionaries are the most favorite things in Python)

davvoprod.
Автор

Dictionaries in python is very helpful sir

diptimaurya
Автор

Nice sir ...waiting for the next video.

PsSarvna
Автор

Another excellent video, although I have one quick question: why does the order of the keys (and hence, their values) change after the dictionary's been defined?

ConorJTobin
Автор

Can keys and values be dictionaries themselves?

DarshanSenTheComposer
Автор

Why did the 'Surname' key get added in the 3rd position of the dictionary and not at the end? You clearly saw this happen but did not think to explain to us why this happened. It's not even to do with a - z or z - a sorting as the key 'year' comes before 'Surname', 'age' is last and 'name' is the first! And, why use 'D.items' to see all the items (key/value pairs) of a dictionary when you can simply refer to 'D' and retrieve the dictionary? No explanation! I really like your videos, whatever your name is, but you just do not explain things that really do need to be explained! We are would-be programmers and are therefore inquisitive people. Please explain anything that is clearly not obvious!

johnny_pilot