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 Now this conditional block happens to be a inside a function, but it can also be outside a function 1
such as this. 2
And let's say 3
3 > 1 print greater. 4
Else print 5
not greater and you'll get greater. 6
What a conditional block checks is actually checks 7
if this is true, so True it's actually another type in Python just like integers, and lists, and strings 8
true is another type, so that is actually the equivalent of if true print greater. 9
Else print not greater. 10
So true is always true. 11
Similarly type 3 for example equals to int will return true. 12
So that's what we are doing here as well. 13
However there is another way which is considered better in Python to use 14
isinstance, isinstance, value and you want to check for dictionaries here like that, executes and you're 15
going to get the same output. 16
So isinstance(3, int) will get you the same output. 17
You can use either one but for some advanced reasons which I'm not going to explain right now because 18
it's out of the context at this point of the course is better to use isinstance. 19
You saw this example where I used if 3 is greater than 1 and I printed out great and not greater. 20
So we could also have these three cases like three is greater than one. 21
Three is equal to one and three is less than one. 22
In that case if and else is not enough, we need something else, and I'm going to show you all we can do 23
that in the next video.
Can't find what you're looking for?
Get subtitles in any language from opensubtitles.com, and translate them here.