Afrikaans
Akan
Albanian
Amharic
Arabic
Armenian
Azerbaijani
Basque
Belarusian
Bemba
Bengali
Bihari
Bosnian
Breton
Bulgarian
Cambodian
Catalan
Cebuano
Cherokee
Chichewa
Chinese (Simplified)
Chinese (Traditional)
Corsican
Croatian
Czech
Danish
Dutch
English
Esperanto
Estonian
Ewe
Faroese
Filipino
Finnish
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
Aaron and welcome in this new video in this video we're going to talk about the loop for the loop for
is very useful in Python and you really need to master it because it will allow us to iterate something
on a list or a sequence or dataframe.
It will really allow us to iterate something on a lot of objects.
So it's very necessary to master it.
For example, if a quit lists name sequence.
And I want to create a loop for just to print each element of the list one by one I will use as a full
operator.
Then you need to put the name of the new variable.
So as you want, for example, you can put it in, but you put what you want.
You just need to understand that this virtual item will represent one by one, each element of this
sequence.
So for item in sequence.
So because we need to tell Python in which object you want to take the item, then you put a double
point.
You go to the line and there is also an indentation because you need to tell to Python.
That's the following year is for the loophole and notes in the normal code.
So you put a prince or item.
It is a really simple example, but in the loophole you can put pretty that you want.
So for example, if you want to do the scrap of each eye, then you can do it like this.
So as you can see, it's very powerful to master the loophole.
So it's essential to muster it to work in algorithmic trading.
Now let me show you how to do a loop in a range of data.
So for item in and then we are going to use the ring function.
The winch function will allow us to
take all the integral number from zero to here six, for example.
So if a print item, you can see that you have zero one two three four five.
But if you want to begin, for example, two six, you can do it.
Just turning to Python that we begin from six to 10.
So it is really easy to use, and it is the most common way to use a for loop.
And there exists another way to create a loop, but a little bit more complex, but it's at least necessary
to know that this way exists because it is a way to simplify your code.
And sometimes when you work with a lot of good, it is very some trick like this to have less good to
work with it.
So we are going to see how to create a loop in a list.
So to do it, you need to put first.
What we are going to do in the lists this spot and then you need to put four item in range.
Then, Hugh, it's very important to understand that we don't need to put the double point because we
need to write this in only one line.
So Python has no need to seek the double plain because this syntax is written only in one line.
So if I learned if I runs a could, you can see that I have exactly the same thing as before, except
that here we need to begin at one.
Again, I will only advise you to work with the loophole in your way to weeding Must-Reads.
Can't find what you're looking for?
Get subtitles in any language from opensubtitles.com, and translate them here.