All language subtitles for 7. Type of object Dictionary

af Afrikaans
ak Akan
sq Albanian
am Amharic
ar Arabic
hy Armenian
az Azerbaijani
eu Basque
be Belarusian
bem Bemba
bn Bengali
bh Bihari
bs Bosnian
br Breton
bg Bulgarian
km Cambodian
ca Catalan
ceb Cebuano
chr Cherokee
ny Chichewa
zh-CN Chinese (Simplified)
zh-TW Chinese (Traditional)
co Corsican
hr Croatian
cs Czech
da Danish
nl Dutch
en English
eo Esperanto
et Estonian
ee Ewe
fo Faroese
tl Filipino
fi Finnish
fr French Download
fy Frisian
gaa Ga
gl Galician
ka Georgian
de German
el Greek
gn Guarani
gu Gujarati
ht Haitian Creole
ha Hausa
haw Hawaiian
iw Hebrew
hi Hindi
hmn Hmong
hu Hungarian
is Icelandic
ig Igbo
id Indonesian
ia Interlingua
ga Irish
it Italian
ja Japanese
jw Javanese
kn Kannada
kk Kazakh
rw Kinyarwanda
rn Kirundi
kg Kongo
ko Korean
kri Krio (Sierra Leone)
ku Kurdish
ckb Kurdish (Soranî)
ky Kyrgyz
lo Laothian
la Latin
lv Latvian
ln Lingala
lt Lithuanian
loz Lozi
lg Luganda
ach Luo
lb Luxembourgish
mk Macedonian
mg Malagasy
ms Malay
ml Malayalam
mt Maltese
mi Maori
mr Marathi
mfe Mauritian Creole
mo Moldavian
mn Mongolian
my Myanmar (Burmese)
sr-ME Montenegrin
ne Nepali
pcm Nigerian Pidgin
nso Northern Sotho
no Norwegian
nn Norwegian (Nynorsk)
oc Occitan
or Oriya
om Oromo
ps Pashto
fa Persian
pl Polish
pt-BR Portuguese (Brazil)
pt Portuguese (Portugal)
pa Punjabi
qu Quechua
ro Romanian
rm Romansh
nyn Runyakitara
ru Russian
sm Samoan
gd Scots Gaelic
sr Serbian
sh Serbo-Croatian
st Sesotho
tn Setswana
crs Seychellois Creole
sn Shona
sd Sindhi
si Sinhalese
sk Slovak
sl Slovenian
so Somali
es Spanish
es-419 Spanish (Latin American)
su Sundanese
sw Swahili
sv Swedish
tg Tajik
ta Tamil
tt Tatar
te Telugu
th Thai
ti Tigrinya
to Tonga
lua Tshiluba
tum Tumbuka
tr Turkish
tk Turkmen
tw Twi
ug Uighur
uk Ukrainian
ur Urdu
uz Uzbek
vi Vietnamese
cy Welsh
wo Wolof
xh Xhosa
yi Yiddish
yo Yoruba
zu Zulu

Original subtitles

I run and welcome in this new video.

In this video, we're going to talk about dictionaries and dictionary in Python is a very interesting

object.

It will also allow us to store different value in a same verbal as for the list.

But instead of the list, a dictionary is not indexing by number from zero to end, for example.

Indeed, when you create a dictionary, you need to put the value in the dictionary.

And for each venue, you need to put the associate key, which is a string containing the name of this

value, and it is name the key of the value in the dictionary.

Very, very important things to note, which is that in a dictionary, you can only put a key one time.

So let us begin to code something for the dictionary.

If I want to intonation a nympho dictionary, I will put the name of their variable and a 90 per of

brothels.

If I want to incised a dictionary with this time value, we need to put

the coin of this value and then the value itself.

So for each value, we need to specify.

So.

The venue and the key associated to this venue, and it is important to note, puts the same key military

part time, because if

I put the same key more than one time, I would have an issue.

For example, if I want to

put that so.

We can see that we have met three values here, and it is not an issue, but it is more.

Problematic than usual issue, because if you don't know how a dictionary work, you will have some

error when you are going to could and if you use a dictionary in a rhythmic trading strategy, you can

lose money.

So while we have only two value here instead of three sets, initially, it is because when you put

a key two times, Python takes only the last value.

So if I put here under him, I will have I'm doing for Tesla.

So the first venue he.

He's not taking into account by Python, so.

I will delete this line.

And now we are going to add some value in a dictionary, so it is very simple to do it.

We need to specify in a pair of brackets the key of the venue.

And then we put just the value that we won't have to the dictionary.

Then we can also change of venue, for example, if I want to change the value of Microsoft, I have

just to do exactly the same could because if.

The key is not in the dictionary.

It will create a new venue, but have never seen before.

If the venue is already in the dictionary, it will only change the value.

So if I put three firms in here, it just change the value of Microsoft.

So if you want to extract the price, you need to put the name of the dictionary, then a pair of brackets.

And in this bear bracket, the name of the key associate to the value that you want to extract from

the dictionary.

So.

And we can also see how to delete a value

and to do it is exactly the thing has for the list.

So we used to then operator and then you put the name of the dictionary, then a pair of brackets and

instead of their number from the list, we need to put the key for the dictionary.

So now we are going to see very quickly two interesting function for the dictionary, which are keys

and values.

The key function, which allows us to extract all the key in a dictionary, and it is very interesting

some time, for example, to understand that the number of the venue in a dictionary or to have more

information about this dictionary because the key is a string so we can extract some information.

For example, here, if we extract the key, we can understand that these dictionary contain price inside

of a list.

If we extract the index, we have zero one two three four five, etcetera, and then we can extract

also the value, this time using the function of ventures.

So again, we have seen a lot of things, and it is very important to play with this method to really

master it.

Can't find what you're looking for?
Get subtitles in any language from opensubtitles.com, and translate them here.