All language subtitles for 15. White Space

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
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
eo Esperanto
et Estonian
ee Ewe
fo Faroese
tl Filipino
fi Finnish
fr French
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

0 In this lecture I would like to clarify the use of white space so when to use one white space, 1

when to use more than one, 2

and when not to use whitespace, and to explain that to you I've got a script here with three parts. 3

Each of the parts will do the same thing. 4

So the first one prints out a, aa, and three a's, and then b here, and then c. 5

So the first one here I typed in one, two, three, four, five, six. Six spaces. 6

So that will work. 7

As you can see here you get the output correctly but it's not a good practice. 8

Even though that will work it's not a good practice because the code is not very readable. 9

So that's a problem with this first block. And here in the second block 10

I fixed that so the space here is just right. 11

Basically you you want to separate things with spaces. When it comes to operators such as the comparison 12

operators or plus or minus or a multiplication 13

the code will work even if you don't have any spaces like that. 14

However to make the code more readable it's better to have some spaces between operators as well. 15

So the space between if and a number is a must. 16

If you have that the code will not work. 17

You will get an invalid syntax. 18

However no space between operators is fine so that's the problem in this block here that you have these expression 19

without spaces, in some particular cases like sometimes I don't use spaces in the videos because I want 20

to show you the text in a greater font so I have to sacrifice with less spaces so that I can fit more 21

text in a screen. 22

So unless you have a good reason to do so please use spaces, one space, and then here that is fine. 23

So one space here, one here, and one there, and then after the colon. 24

So this is what you should know. 25

And I told you already about indentation, after a colon you all this have indentation, indentation means 26

at least one space. 27

So this would also work like that. 28

But a good practice is to have four spaces, four. 29

So that's correct. 30

And when you have more code in your script it's good to separate things with a break line, so to separate logic. 31

So if you have a conditional block there you have to write them line by line no brake lines here 32

like that. 33

That would also work. 34

But please don't use brake lights to make your code more readable however once the conditional block ends, 35

you have another logical block. 36

There's no clear cut rules here but just user logic. 37

So I thought it's good to have these print functions without brake line between them. 38

So here if I would add another function would make a brake line and then create a function here and 39

so on. 40

And of course use indentation for functions as well. 41

So after the colon always comes the indentation, an that's it more or less about spaces whitespace in 42

Python.

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