+++ when use yield the MAIN value of the function will be the one that assigned to yield (sq) +++when ask for the function (which main value of it is the one that assigned to yield because of yield effect) will give you the next value of the variable that assigned to yield (sq) and that was the main two features of yield
You said that Generators do not work in methods but do in functions, which means it can not be made in a class, but, i actually did it and that to in a static method inside of a class.
If you have 100 TBs if data and want to reduce the data, you can use loops because of memory constraints but you can use generators to load chunks of data and reduce it one by one.
sir please make a video on how to make a website using python. we expect that... . many people are already teaching to make a website but no one good for nothing .because they are not reliable we rely on you.
We normally fetch the records in a cursor then loop thru and process one record at a time rt? Yes, we are fetching 1000 records into memory with the cursor, we can overcome this with Generators is what you mean? little confusion , someone pls clarify
Hi Sir, I have a query regarding the file handling videos, can you please make a separate video on file handling, how to upload the image, song etc. I will be thankful to you if you make so.
You did not explain how yield works i.e does the function just "stop" in time when it reaches yield and how does for loop know that no more yields are coming?
It will create memory error if we use large number to iterate...since it will first store the value..generators helps to avoid that error since it will not store the values
Hi, I have a clarification how the code worked. We just created "values" object. We didn't call any methods, but still how it is printing. Generally we have to call the method (eg:- values.__iter__() or values.__next__()) right? Is there anything like the methods declared with dunders(___x__()) will be executed automatically when you create an instance. When we gave "print(next(values))" it printed only once, where as in for loop it printed 10 times. So how the variable 'i' knows its iteration value. Can anyone help
Hey! For loops are very cool, but you are a bit limited. With the method next() you can use the first element of your list for something, than write some lines of codes and than use the next element of your list (tuple, string...) for something different. Thi is something that cannot be done with for loop. For loop is great but only when you want to do the exact same thing with every single element of your list. I hope you can understand, sorry for my english, it is not my native language and good luck with programming!
values will become Integer not generator class.. For Loop should be used with iterators So when you use return , In for loop you should you use range(values)
@@RANDOMSTUFF-my3yd Yeah, But if we set the user input in the for loop itself, the code will still work, either way if you want to use for loop or while loop, your choice!
videos are getting very much interesting as we go towards the end of the course...thankyou sir !!
I discovered your channel recently and I've been enjoying your good work. Please keep it up.
Thank you Naveen Reddy Sir for your series on python..It helped me to learn in an easy manner ...Thank you so much
Daily I watch your videos one by one. you Explain the concept in such a way that we Easily catch you...
KEEP GOING SIR..
Awesome sir very nice. I am following python series from the very beginning and will go till the End
Hi Navin sir , Thank you somuch for making each and every concept so simple and understandable .keep up the good work.
We can also creat generator with generator comprehension...
G = (i for i in range(1,10))
But isn't that what we want to avoid? Creating a list/tuple with all the desired records stored in the memory all at once?
@@VivekYadav-ds8oz not when you print(next(G))
Love your style of explaining things very efficiently 👍👍👍
ohh....man..what an confidence of teaching ...ur kind of different comparing others..cool way of teaching
enjoying your videos ..... We got to know much more deep information from your explantaion
I am grateful to you sir....
Very Nice teaching sir...........
Hello i really learn alot from your videos i am from Kenya i learn python on my smartphone sololearn and evertime i
Very simple and easy to follow examples. kudos to you.
Very much interesting!! And clear about all concept and doubts.
def topten():
for i in range(1,11):
yield i*i
values = topten()
for i in values:
print(i)
Very well explained . Thanks.
Your teaching technique is awesome 👌👌👌👍👍
Hey Naveen Coz of You I have learned Python and Django perfectly Thank You So Much :-) Love from Hyderabad 😍
+++ when use yield the MAIN value of the function will be the one that assigned to yield (sq)
+++when ask for the function (which main value of it is the one that assigned to yield because of yield effect) will give you the next value of the variable that assigned to yield (sq) and that was the main two features of yield
print("sir you looks good in mustache and you teaching method() is also very impressive")
def table():
n = int(input('enter value to find table of it:'))
itt = 1
while itt
Amazing explanation in every video. Very useful to clear the concepts.
thanks sir.. your videos are awesome, and it makes us feel like coding is tricky but easy.
You said that Generators do not work in methods but do in functions, which means it can not be made in a class, but, i actually did it and that to in a static method inside of a class.
sir, I am understood the your lectures ,that is very interesting .Thanks a lot.
the best explanation on the internet. good job
why we have to write 15-16 of code just to print 1--10 values. this can be easily done with the help of loops
If you have 100 TBs if data and want to reduce the data, you can use loops because of memory constraints but you can use generators to load chunks of data and reduce it one by one.
Easy to understand explanation and example thank you very much bro✌🏻
Hi can you make videos of Linux , Jenkins and devops
sir please make a video on how to make a website using python. we expect that... . many people are already teaching to make a website but no one good for nothing .because they are not reliable we rely on you.
Thank you, My family is happy now, and that is what i want
- Thomas Shelby
this course is best ,ultimate best
Video and Content quality is Amazing sirG🤩🤩🤩🤩🤩
Really? Try epsiode 60.
yield = iterative return is it sir
Sir, what was the use of all these things if we had to use for loop at the end for printing values ?
Please anyone EXPLAIN !!!
Everytine i visit your videos i realise there so many things left out in sololearn do u offer classes on smart phone
just awesome sir
This is awesome explanation. Keep going. It helps python community
As per example the data came at once for all, so how do we differentiate between iterator and generator.
What a great explanation! Thank you so much.
We normally fetch the records in a cursor then loop thru and process one record at a time rt? Yes, we are fetching 1000 records into memory with the cursor, we can overcome this with Generators is what you mean? little confusion , someone pls clarify
Hi Sir, I have a query regarding the file handling videos, can you please make a separate video on file handling, how to upload the image, song etc. I will be thankful to you if you make so.
sir u r looking different in this vedio
useful video 👍
Thank you sir for this informative video, subscribed
Understood... Thanks :)
I am studying 11th standard. I don't know whether genetators are there in 11th portion. Please reply whether these portions are there for me.
Clean Explanation!!!
You did not explain how yield works i.e does the function just "stop" in time when it reaches yield and how does for loop know that no more yields are coming?
greast vid
😃
great to understand
Great Video
Hii sr pls sr help me sr muje ye nhi
Pata chl rha he ki me computer programing me ky kru...
Thank you so much sir
good job
Excellent explanation.. Thanku..
Gr8 💯✨ thnk u
not really for beginners bruh
Thanks
Awesome
Thank you sir
why can't we use a for loop here instead of while loop? pls explain
you are superb sir
Hi Navin,
Why a function and not a class?
Awesome , Thank you Sir
5:10
So an iterator fetches all items in a sequence first?
Yup.
SUPER SIR
thanks
superb
Why do we need generator and iterator ,if we can iterate using loops
It will create memory error if we use large number to iterate...since it will first store the value..generators helps to avoid that error since it will not store the values
to iterate not just int or any built in types, but iterate our own class ojects
can someone clarify..why is while being executed once at a time??
Good job
make series on python turtle
Hi, I have a clarification how the code worked. We just created "values" object. We didn't call any methods, but still how it is printing. Generally we have to call the method (eg:- values.__iter__() or values.__next__()) right?
Is there anything like the methods declared with dunders(___x__()) will be executed automatically when you create an instance.
When we gave "print(next(values))" it printed only once, where as in for loop it printed 10 times. So how the variable 'i' knows its iteration value. Can anyone help
when you use yield it will return iterator
can we use genrator inside the class ? if yes anyone explain me with example?
so what i don't get is that where we can use this
Thanks!
sir the same thing be done without yield
you are amazinggggggggggggggggggggggggggggg
if we can use for loop then what is the need of next(). can you please clarify
Hey! For loops are very cool, but you are a bit limited. With the method next() you can use the first element of your list for something, than write some lines of codes and than use the next element of your list (tuple, string...) for something different.
Thi is something that cannot be done with for loop. For loop is great but only when you want to do the exact same thing with every single element of your list.
I hope you can understand, sorry for my english, it is not my native language and good luck with programming!
Why do we use iterators and generators in real life?
great
I didn't get the difference between this iterator and generator.. Can anyone help me out with this!!!!
if i replace yield using return then the code is failing - 'int' object is not iterable - pls stat whats issue here
values will become Integer not generator class.. For Loop should be used with iterators
So when you use return , In for loop you should you use range(values)
Good
fantastic concept!!!
Thank u Sir!
tq
class twenty():
n=1
while n
No because of you do not using class using def()
ha ha. i knew it. iterator --> generator
Can we write this statement instead of the while loop?
for i in range (1,11):
sq=i*i
yield sq
Yes
but it will only work when you know there are 10 numbers only
but when you have to get values from user then your code will not come in use. ✌
@@RANDOMSTUFF-my3yd Yeah, But if we set the user input in the for loop itself, the code will still work, either way if you want to use for loop or while loop, your choice!
so for loops are iterator implementations ???
yes
hi..is it really necessary to have a knowledge on full python for data science..
Yes bro u have to not the entire part but we need to implement oru analysticals through such and i too learning it for da:-)
Eeeeeld = yield ?!
which means
Eellow = yellow
Sir O/p may be 1,2,1,2,3,4 right
Because __next__ method wil preserve old values ... You told sir
dammmm nice
informational video, but the music at the start and end irritates. overall it's a nice video... thanks
Why not class?
❤
its very tough to understand your way of explaining.