All language subtitles for 014 Strings-subtitle-en

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
sh Serbo-Croatian
st Sesotho
tn Setswana
crs Seychellois Creole
sn Shona
sd Sindhi
si Sinhalese
sk Slovak
sl Slovenian
so Somali
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

1

Hi, welcome again. In the previous lecture

we were talking about numbers.

3

Specifically we looked at integers and

float data types so these are referred

5

to as data types in Python, so integers

and floats. In this lecture we're going

7

to look at strings. I already mentioned

strings in the previous lecture.

9

So a string is everything that goes

inside quotes. "Hi there". That is a string.

11

And of course strings can be stored in

variables and you can print those

13

variables, so we're using the interactive

shell now, but of course you can use a

15

part of script as we did previously.

So numbers were used to do math operations,

17

but strings, strings are used for

displaying information for the user.

19

So let's say you have a web application, and

you want to generate some text

21

dynamically on the web page, so you'd use

would use Python on the backend and

23

Python would send strings to the HTML

code and HTML would render the

25

code on the web page basically that's

the idea or if you want to create a

27

notepad, an editor with Python such as

Atom let's say, all these things you see

29

here so my program.py selection file,

so all this would be written as

31

strings inside Python and then you

display them on the interface using

33

various functions, for instance if you

want to display a string on the terminal

35

you'd use the print function. Now strings

have methods associated with them. What I

37

mean with methods is let me go ahead

and try out a method. Methods, for

39

methods you need to use the dot notation.

So you'd refer to the string which is

41

string c in our case actually

variable c, but the variable is holding

43

the strings so it's the same as doing

here dot, so let's do c dot, replace and

45

what I want to replace is e with i.

So I'm replacing, for string here I'm

47

replacing letter e with later i and what

that will do it will replace all

49

the letters, all the occurrences of this

letter in the string, so you'd ask where

51

can we see these method? Well that's

very easy actually. You can do dir and

53

then pass the string there, any string.

It could be c, it could be an empty string

55

or whatever and that will print out all

the available methods that you can use

57

with strings, so let's say c dot upper.

That will cover the strings to

59

upper case letters. Now if you want to

know what these methods are about you

61

could ask for help.

Just do help and then c, so the

63

string or just empty string dot

65

here replace method of the string

instance, so string is like the blueprint

67

that creates strings objects or you can

say the data type that represents texts.

69

Look here. Here is the syntax, so what you

do is, you use a string like we did.

71

So let's say here replace. Then you open

brackets. Here is the old item you want

73

to remove from the string and then the new

item we want to replace it with i and

75

then what you see here in square brackets,

that means this parameter is

77

optional so you can either pass it or

not and you know in the previous case we

79

didn't pass it so what Python did was

it replaced all the occurrences of the i

81

item but if you want to replace only the

first occurrence you do one there and

83

that will replace all the first i over

the first e with i. That's how it works

85

So strings, they support functions,

so print is a function. Here. And they support

87

methods like this one here and they also

support operators so you get "Here"

89

plus "There" and you get "HereThere" or you

can make it more readable like that so

91

an empty space is also a string and yeah

that's about strings for now and I'll

93

talk to you later.

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