Python dictionaries 📖

preview_player
Показать описание
Python dictionaries tutorial explained

#dictionary = A changeable, unordered collection of unique key:value pairs
# Fast because they use hashing, allow us to access a value quickly

capitals = {'USA':'Washington DC',
'India':'New Dehli',
'China':'Beijing',
'Russia':'Moscow'}

#print(capitals['Germany'])

print(key, value)

#python #dictionaries #dictionary

––––––––––––––––––––––––––––––
Creative Commons — Attribution-ShareAlike 3.0 Unported— CC BY-SA 3.0
––––––––––––––––––––––––––––––
Рекомендации по теме
Комментарии
Автор

Yes, I am aware I misspelled New Delhi 🤦‍♂

# dictionary = A changeable, *ordered collection of unique key:value pairs
# Fast because they use hashing, allow us to access a value quickly
# *dictionaries are now ordered as of Python version 3.7

capitals = {'USA':'Washington DC',
'India':'New Delhi',
'China':'Beijing',
'Russia':'Moscow'}

#
# capitals.update({'USA':'Las Vegas'})
# capitals.pop('China')
# capitals.clear()

# print(capitals['Germany'])
#
# print(capitals.keys())
# print(capitals.values())
# print(capitals.items())

for key, value in capitals.items():
print(key, value)

BroCodez
Автор

With other videos I checked, I like this better. Straight to the point and showing how it is done so I can follow along.

RecyHeller-xorc
Автор

This video made me finally understand for loops. Nice.

mslightsite
Автор

Thank you very much, I am feeling good when I learn the coding from your channel keep going, Bro!

KDB_
Автор

bro i love this channel i learnt dictionaries after some struggling thanks

vfxentity
Автор

Nice video. Very simple but informative

blueberrycheesecake
Автор

Me : while simultaneously codding with him.
He : lets take INDIA next...
Me : Felt Proud I shared his channel to all available social media.
:-) Bro Code

Bitter.Truth.For.You.
Автор

thank you so much for this! I am working on a project in school and nothing could be more helpful than this. Keep up the amazing work :D

Karim-
Автор

Bro! You inspire me to learn python, thank you!!!

slonbeskonechen
Автор

As of Python version 3.7, dictionaries are *ordered.* In Python 3.6 and earlier, dictionaries are unordered.

_._lis_._
Автор

dictionary = changeable, unordered collection of unique key:value pairs
# allow to access a value quickly

joseluizlinotrochmann
Автор

Comment because you said so. Thanks Bro.

carsonjohnson
Автор

Great videos, more python videos please <3

ahmetaydn
Автор

what is the difference between
print(key, value)
and
print(capitals.items())?
Thanks

theobserver
Автор

6:39 - "So let's say we would like to remove China."

DxCKnew
Автор

1:46 the spelling is "delhi" not "dehli" the explanation is fantastic

ScienceVashu
Автор

Can you make a dictionary of strings assigned as variable names to functions? Can you call those functions by invoking those strings?

robinpage
Автор

Bro Code: "Let's pretend US Government has decided relocate it's capital to Las Vegas."

Fallout fans: "Don't you mean...New Vegas?"

dylanwatson
Автор

Before watching these I was but a man. Now I stand above reality itself as my own god

johnmcclure