#61 Python Tutorial for Beginners | Iterator

#61 Python Tutorial for Beginners | Iterator

Telusko

5 лет назад

335,179 Просмотров

Ссылки и html тэги не поддерживаются


Комментарии:

Dobby
Dobby - 18.09.2023 19:43

Im sorry to say your explanation is becoming staler and actually complicates the concepts,for the last 3 videos including this one .i had to go to another video and learn it and comeback here.i hope i don't have to do that every video from now on

Ответить
Mohammad ziauddin
Mohammad ziauddin - 07.06.2023 21:18

There was an indentation error at return val thats why its repeating., remove 1 space before return.

Ответить
Rama Ravipati
Rama Ravipati - 03.06.2023 15:21

nice video

Ответить
something new
something new - 08.04.2023 22:32

Where are you from?

Ответить
himalyanomad
himalyanomad - 27.03.2023 12:13

shikhar dhawan op

Ответить
Volund the_Smith
Volund the_Smith - 07.02.2023 02:13

Good

Ответить
Mr Vilgax
Mr Vilgax - 14.11.2022 16:19

how many of you went back video and see he have mustache(search meaning in google) of our teacher 😂🤣🤣

Ответить
Mahdi Hasan
Mahdi Hasan - 08.11.2022 13:25

If you want to work the loop for multiple times put "self.num = 1" in else condition.

Ответить
Paul Harris
Paul Harris - 25.09.2022 17:20

Excellent video! Thank you

Ответить
P.L.Ramakrishna
P.L.Ramakrishna - 31.08.2022 08:23

we are hearing to learn, not checking your talent.

Ответить
Rajitha Amarasinghe
Rajitha Amarasinghe - 12.06.2022 13:18

If you type
print(next(values))
after the for loop, you will get an Error.

Ответить
Sofiya Rao
Sofiya Rao - 20.04.2022 21:28

pythoooooooooonnnn

Ответить
XtonXㅤ -The Official Beech SLAYER
XtonXㅤ -The Official Beech SLAYER - 26.03.2022 16:53

i geniunly have a hatred toward people using light mode

Ответить
Naing Min D
Naing Min D - 09.01.2022 15:50

Finally I got this yayyyyy

Ответить
Abhi Gaming
Abhi Gaming - 18.12.2021 10:27

bakwas

Ответить
Ahabab Bin Habib Osama
Ahabab Bin Habib Osama - 15.11.2021 14:15

I like your moustache

Ответить
Minhaz Uddin
Minhaz Uddin - 10.11.2021 11:56

I'm not an alien, thus, I'll always skip the first 10 sec of your videos.

Ответить
Harsh Amin
Harsh Amin - 25.10.2021 20:45

Sir,
Why can't we use break in else part to stop the execution of for loop ?

Ответить
DHRUV CHAUDHARY
DHRUV CHAUDHARY - 01.10.2021 13:12

sir could you please suggest me a source from where i can practice python, please!!

Ответить
Sergio EB
Sergio EB - 18.09.2021 03:29

I still can't seem to comprehend the word iterate, aswell when he says it 'loops' over. I would really appreciate if anyone could dumb down the explanation as much as possible I'm desperate to understand this concept lol. Thank you in advance

Ответить
Sagar R
Sagar R - 05.09.2021 13:05

By this way are v overloading the Iter & next inbuilt function ?

Ответить
Uma Uma
Uma Uma - 02.09.2021 13:11

Mota badu

Ответить
Dan
Dan - 01.09.2021 20:15

Thank you Mr. Reddy!

Ответить
Tanay Samanta
Tanay Samanta - 16.08.2021 11:15

def __iter__(self):
return self

What is the reason of using it? Can anyone explain?

Ответить
narragopi chand
narragopi chand - 03.08.2021 06:15

If something is returned in a function it return value to function call right ? What is happening to return here. Object is being returned......

Ответить
Tejus Performance
Tejus Performance - 16.06.2021 12:50

the answer is:
1
2
3
4
5
6
7
8
9
10

Ответить
Shubham Vashisth
Shubham Vashisth - 06.06.2021 11:24

since we already have for loop to iterate the list then why are we making things more complex by making this iterator

Ответить
Pawan Kumar
Pawan Kumar - 29.05.2021 07:53

'1' will be printed twice as the 'for loop' always starts from the 1st element in the list. so both are different things and it will give the twice ones then will continue up to what we want to print.

Ответить
swetha sundaram
swetha sundaram - 26.05.2021 21:31

The raise keyword is used to raise an exception. You can define what kind of error to raise(here its StopIteration).

Ответить
Venkat Ratnam
Venkat Ratnam - 24.05.2021 13:25

after a long time i have seen your mustache

Ответить
Parth Kajiwala
Parth Kajiwala - 21.05.2021 00:37

same value

Ответить
Sai Tanush
Sai Tanush - 19.05.2021 22:29

tq

Ответить
PRATIMA MAURYA
PRATIMA MAURYA - 16.05.2021 11:10

please make series on python turtle

Ответить
Vanshika Sharma
Vanshika Sharma - 15.05.2021 17:11

hiii bro, create the own class that not repeat again values...but inbuild the value or nums it can repeating ....i wanna clear about it this video

Ответить
virtual magic
virtual magic - 01.04.2021 12:04

What does that __iter__() method do here sir

Ответить
sivasaran
sivasaran - 30.03.2021 17:07

can we use break instead of "raise stop iteration"

Ответить
Sowmya
Sowmya - 30.03.2021 13:29

why even without calling iter and next methods they are running

Ответить
IT Skills with Suraj Datir
IT Skills with Suraj Datir - 22.02.2021 13:04

looking handsome

Ответить
Неъматов Исломбек
Неъматов Исломбек - 06.02.2021 09:15

Thank you Mr. Navin !

Ответить
Sohail Anwar
Sohail Anwar - 04.02.2021 20:17

In pycharm you can use (control + d) to copy the line and paste it onto the next in the place of using (ctrl + c) and (ctrl + v).

Ответить
Ankit Chetri
Ankit Chetri - 18.01.2021 16:11

To be honest i understood this better from u sir in comparison to code with harry ,i m not comparing but actually u r a little better in explaining , don't kill me code with harry fans i am also his fan it's just my opinion

Ответить
A S
A S - 06.01.2021 17:07

print statement prints 1 and the for loop prints 2, 3, 4,..., 10

Ответить
Squad Slayer
Squad Slayer - 30.12.2020 16:07

It will give all ten value once

Ответить
Abhishek Thakur
Abhishek Thakur - 02.12.2020 16:18

Bhaya samajh ni aya

Ответить
Naes One
Naes One - 28.11.2020 22:34

wow you really explain well and are one of the few indians that have no accent almost respect

Ответить
Anosh Kaniskar
Anosh Kaniskar - 25.11.2020 13:37

The when you say Iterators. How cool is that..

Ответить
Sakthi Vadivel
Sakthi Vadivel - 24.11.2020 17:25

class TopTen:

def __init__(self):
self.num=1

def __iter__(self):
return self

def __next__(self):
val=self.num
self.num += 1

return val

values = TopTen()

for i in values:
print(i)
------------
i'm getting error like: TypeError: 'TopTen' object is not iterable
------------
Could'u help me to fix this ?

Ответить
Korean Panda
Korean Panda - 23.11.2020 23:24

I'm confused. Couldn't we just print "nums" to output the values? Why did we need a "for" statement to display all 4 values?

Ответить
Start Journey
Start Journey - 23.11.2020 09:14

Dil se dhanywaad🙏✌️🤗

Ответить