All language subtitles for 13. Strings

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
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 Download
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

All right.

We're almost kind of flying through this.

I know we're going slow here.

But trust me once you get these data types things become a lot easier.

So we're just climbing that mountain so that we can start looking at a higher level at the language

of Python to keep going.

Let's talk about this data type SDR which stands for strings.

We'll see what they are

a string is simply well a piece of text for example a string can be written with quotation marks.

And I can say hi.

Hello there.

And that is a string.

You see that the color changed here and my editor.

I can also make strings with double quotes.

So once again this is also a valid string.

And I can put anything I want in here.

I can do numbers if I wanted to.

Exclamation marks.

It's just a piece of text you can think of it as a sentence for now and if I do the type function here

remember these brackets to note that we want to perform some sort of action which is we're using the

type action that Python gives us.

And if I click Run you see that.

Oh and remember we have to print it out it is also let's do print so that we can see the display and

I click Run you see that it's SDR.

It's a type of string.

Now we can use this in important ways.

For example imagine you're creating a log in form and we want to collect somebodies username and password.

Well we can have user name variable that we assign let's say some sort of user name let's call it super

coder and then password can be super secret.

And now we have these variables usernames and passwords that we can use throughout our program such

as to check if a password exists.

And remember I can use single quotes or double quotes but there's a third way that we can write strings

in Python.

And this well is used for long strings.

So let's just create a variable long string.

And while we can do here is three single quotes in a row like this.

And then here I can just say wow maybe so a pair of eyes of somebody that's really impressed.

And let's go with a mouth that actually kind of looks like here.

All right.

And then I finish it off with three single quotes.

Again so now if I print the long string and I click Run look at that my little weird emoji face is printed.

So the three single quotes is four long strings that I can keep going on multiple lines for example.

I can't do this with a single quote.

You see that the orange color is now gone because python is going to say this is a new line.

And this is another line and it's going to give me an error because well a caret with a quote doesn't

mean anything.

But if we use three single quotes you can see that we can do multi line strings and this is really useful

if you want to have maybe long sentences and paragraphs.

Now with a string we use we can do some cool things that we saw in the numbers videos.

What if I had something like this Let's say I wanted to grab the first name of a user just give my own

name here and then last name and again my super hard to pronounce last name.

Could we do something like this where we have a full name.

Equals to first name plus last name and then if we print here the full name like this should this work.

Well let's have a look.

Let me remove this part of here just so we have nice and clean looking code.

And if I click Run.

There you go.

My name is printed but you see that there's no spaces here because we're going to use the addition sign

to attach Andre to Nagoya.

But you can see that there's no spaces here.

So I can add a space if I wanted to or I can just simply create another string inside of here just like

this and then add a spacing between so we're just using the plus sign which we've seen in the numbers

videos but instead to add strings together and now if I click Run you see that I got the space because

I'm adding a space in here and between the names very very cool but there's a few more neat things that

we can do with strings.

So let's take a break and I'll see you in the next video.

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