Python 3 Programming Tutorial - Dictionaries

preview_player
Показать описание
In this Python 3 programming tutorial, we cover Python dictionaries. Dictionaries are a data structure in Python that are very similar to associative arrays. They are unordered and contain "keys" and "values." Each key is unique and the values can be just about anything.

Dictionaries are sets and they are defined with {} curly braces.

Bitcoin donations: 1GV7srgR4NJx4vrk7avCmmVQQrqmv87ty6

Рекомендации по теме
Комментарии
Автор

R.I.P. Tim 2:41 - 4:15 He has been killed by the del function.

caster
Автор

This was a deadly tutorial for Tim, but very usefull for me. ;) Thanks!

IvayloSpasov
Автор

you are a nice young man, thank you for helping me learn to use python. Now my grandchildren wont think im so lame

crimeariver
Автор

Tim was the one ringing the bell at the end

Scaryder
Автор

The real tragedy here is Jeff, who could've been born, but never had a chance thanks to Kevin.

magikarpusedsplash
Автор

Tim lol, i just laughed hard... thnx man, i'll never forget this lesson

kevinkuzwayo
Автор

A big plus on dictionaries is that they are faster to iterate over if you're searching an item in them (compared against lists or tuples). For example, say you have a list, a tuple and a dictionary, all holding the same values (for dictionary - the values should be keys).
The command: " if ___ in *** " will take more time on list > tuple > dictionary.

I made identical arrays, and timed it ( x 100, 000 times ) and it came out 0.196 for the list, 0.166 for the tuple, and 0.128 for the dictionary. This might seem like a small difference, but when you're dealing with large data - this is very noticeable (it's the difference between running a program and having it finish in 2 seconds to needing to wait a few long hours...)

RealMcDudu
Автор

It was me who shouted 'brown'.

JTutorials
Автор

finally i found some good tutorials. thank u your videos are very helpful

vamsisai
Автор

Thanks for the associative array comparison.  Takes me back to my Perl days.  Good times, good times ...

GonsalvoDeCordova
Автор

You would be proud to know that Tim fought bravely against del.

sandipanaich
Автор

nice.i was confused how to use Dictionary until i wathced your video! thank you for your videos! keep it up!

intyinty
Автор

man you have updated your digs since 2014 I'll tell you hwhat

Alptraum
Автор

In this example you are using key to get the value.How would you do the opposite.For example use the value to match the key?

kimyk
Автор

Yes request : if we know and learn but when a problem or creating a software program question is given it’s How do we implement what we learn or practice

hemantbhatt
Автор

Your python videos are amazing.. Keep it up, I want to learn Client Server Chat Application in Python, can you make it and upload a tutorial of it for me, That would be a huge favour man

ShahrukhNasir
Автор

Could u please do a video of dynamic programming?

leochen
Автор

You just explained a lot to me XD Not really to do with _dictionaries_, but rather with that you said about dictionaries being unordered. I loop through dictionaries a lot, and it really confused me about how the values weren't printed out in order.

Great tutorial! Python is an amazing language, and you've probably been using it longer than me (I've been using it around 3 years, but only within the past year or so is when I really got into use it heavily). Poor Tim :|

sonickk
Автор

Hey, you have great tutorials! I learnt a lot from them. I wonder if you can do a tutorial ---> Using user input to create dictionaries in Python using while loops? - This would be much appreciated. Keep up the good work!

lannybh
Автор

How I can input new key and value with input? For example I want to create address book and I need dictionaries.

haimifrah