Afrikaans
Akan
Albanian
Amharic
Arabic
Armenian
Azerbaijani
Basque
Belarusian
Bemba
Bengali
Bihari
Bosnian
Breton
Cambodian
Catalan
Cebuano
Cherokee
Chichewa
Chinese (Simplified)
Chinese (Traditional)
Corsican
Croatian
Czech
Danish
Dutch
English
Esperanto
Estonian
Ewe
Faroese
Filipino
Finnish
French
Frisian
Ga
Galician
Georgian
German
Greek
Guarani
Gujarati
Haitian Creole
Hausa
Hawaiian
Hebrew
Hindi
Hmong
Hungarian
Icelandic
Igbo
Indonesian
Interlingua
Irish
Italian
Japanese
Javanese
Kannada
Kazakh
Kinyarwanda
Kirundi
Kongo
Korean
Krio (Sierra Leone)
Kurdish
Kurdish (Soranรฎ)
Kyrgyz
Laothian
Latin
Latvian
Lingala
Lithuanian
Lozi
Luganda
Luo
Luxembourgish
Macedonian
Malagasy
Malay
Malayalam
Maltese
Maori
Marathi
Mauritian Creole
Moldavian
Mongolian
Myanmar (Burmese)
Montenegrin
Nepali
Nigerian Pidgin
Northern Sotho
Norwegian
Norwegian (Nynorsk)
Occitan
Oriya
Oromo
Pashto
Persian
Polish
Portuguese (Brazil)
Portuguese (Portugal)
Punjabi
Quechua
Romanian
Romansh
Runyakitara
Russian
Samoan
Scots Gaelic
Serbian
Serbo-Croatian
Sesotho
Setswana
Seychellois Creole
Shona
Sindhi
Sinhalese
Slovak
Slovenian
Somali
Spanish
Spanish (Latin American)
Sundanese
Swahili
Swedish
Tajik
Tamil
Tatar
Telugu
Thai
Tigrinya
Tonga
Tshiluba
Tumbuka
Turkish
Turkmen
Twi
Uighur
Ukrainian
Urdu
Uzbek
Vietnamese
Welsh
Wolof
Xhosa
Yiddish
Yoruba
Zulu
0 Do dictionaries have the same index system as lists and strings? 1
Let's find that out. 2
I have this dictionary here on my Python Shell. 3
Student grades. 4
So let's try to get the second item maybe. 5
Nope, it's says KeyError: 1 which means that the dictionary doesn't have a key named 1. 6
So what keys does the dictionary have? 7
Maybe the "Sim" key. 8
Yes, so dictionaries instead of integers they have keys as indexes. 9
So a least would be access, the items of the list would be accessed via integers which start from 10
zero. 11
An end to the last item of the list, the index of the last item of the list. With dictionaries 12
this is different as you can see and this is actually what makes dictionaries a dictionary. 13
Let's see another example of how useful this is. 14
Let's say you have this dictionary English the Portuguese. It's a real human dictionary. 15
You have some words there. 16
Let's say "rain", "chuva" in Portuguese and "sun" will be "sol." 17
Sorry I've got a typo there, quote. 18
So now if you want the Portuguese version of sun, you write that and that will give you that version. 19
So having integers s indexes in this case would be very useless. 20
So every use case has its own data structure to be used in Python.
Can't find what you're looking for?
Get subtitles in any language from opensubtitles.com, and translate them here.