#62 Python Tutorial for Beginners | Generators

  Рет қаралды 295,721

Telusko

Telusko

5 жыл бұрын

Github :- github.com/navinreddy20/Python-

Пікірлер: 139
@thatguyadarsh
@thatguyadarsh 4 жыл бұрын
videos are getting very much interesting as we go towards the end of the course...thankyou sir !!
@saiprasad5856
@saiprasad5856 4 жыл бұрын
Thank you Naveen Reddy Sir for your series on python..It helped me to learn in an easy manner ...Thank you so much
@ShahTV
@ShahTV 4 жыл бұрын
I discovered your channel recently and I've been enjoying your good work. Please keep it up.
@preethirajput9969
@preethirajput9969 Жыл бұрын
Daily I watch your videos one by one. you Explain the concept in such a way that we Easily catch you... KEEP GOING SIR..
@meenukidsvlogs3118
@meenukidsvlogs3118 2 жыл бұрын
Hi Navin sir , Thank you somuch for making each and every concept so simple and understandable .keep up the good work.
@054_ritesh3
@054_ritesh3 3 жыл бұрын
Love your style of explaining things very efficiently 👍👍👍
@MsAlokranjan
@MsAlokranjan 5 жыл бұрын
Your teaching technique is awesome 👌👌👌👍👍
@imranshaikh115
@imranshaikh115 3 жыл бұрын
Awesome sir very nice. I am following python series from the very beginning and will go till the End
@arpanmathe6865
@arpanmathe6865 2 жыл бұрын
Amazing explanation in every video. Very useful to clear the concepts.
@srijayanrajendran5247
@srijayanrajendran5247 2 жыл бұрын
thanks sir.. your videos are awesome, and it makes us feel like coding is tricky but easy.
@vikashsharma8109
@vikashsharma8109 Жыл бұрын
ohh....man..what an confidence of teaching ...ur kind of different comparing others..cool way of teaching
@BIPINKUMAR-wo1ct
@BIPINKUMAR-wo1ct 2 жыл бұрын
Very much interesting!! And clear about all concept and doubts.
@MRGolum
@MRGolum 5 жыл бұрын
We can also creat generator with generator comprehension... G = (i for i in range(1,10))
@VivekYadav-ds8oz
@VivekYadav-ds8oz 4 жыл бұрын
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?
@c_t9908
@c_t9908 4 жыл бұрын
@@VivekYadav-ds8oz not when you print(next(G))
@arockdurai5110
@arockdurai5110 7 ай бұрын
Very simple and easy to follow examples. kudos to you.
@tusharjoshi7177
@tusharjoshi7177 5 жыл бұрын
Hi can you make videos of Linux , Jenkins and devops
@randhirpatil6443
@randhirpatil6443 3 жыл бұрын
sir, I am understood the your lectures ,that is very interesting .Thanks a lot.
@satishj27
@satishj27 2 жыл бұрын
Easy to understand explanation and example thank you very much bro✌🏻
@rajeevsinghrajput6752
@rajeevsinghrajput6752 4 жыл бұрын
I am grateful to you sir.... Very Nice teaching sir...........
@pulkitmehta1795
@pulkitmehta1795 4 жыл бұрын
Very well explained . Thanks.
@shaikanmol7630
@shaikanmol7630 3 жыл бұрын
enjoying your videos ..... We got to know much more deep information from your explantaion
@navneetghosh9691
@navneetghosh9691 5 жыл бұрын
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.
@sammygichuki8349
@sammygichuki8349 3 ай бұрын
Hello i really learn alot from your videos i am from Kenya i learn python on my smartphone sololearn and evertime i
@natashasen3548
@natashasen3548 Жыл бұрын
What a great explanation! Thank you so much.
@aadhiyanth5969
@aadhiyanth5969 7 ай бұрын
Thank you, My family is happy now, and that is what i want - Thomas Shelby
@adarsharora6097
@adarsharora6097 8 ай бұрын
Hi Navin, Why a function and not a class?
@liman12011988
@liman12011988 4 жыл бұрын
Thank you sir for this informative video, subscribed
@moizrehman8594
@moizrehman8594 4 жыл бұрын
print("sir you looks good in mustache and you teaching method() is also very impressive")
@cyclotrongamer4263
@cyclotrongamer4263 2 жыл бұрын
Video and Content quality is Amazing sirG🤩🤩🤩🤩🤩
@kashifstudent2791
@kashifstudent2791 Жыл бұрын
yield = iterative return is it sir
@demigod6190
@demigod6190 4 жыл бұрын
just awesome sir
@prabalbhardwaj1829
@prabalbhardwaj1829 5 жыл бұрын
Awesome , Thank you Sir
@letsdoeverythinginoneweek9398
@letsdoeverythinginoneweek9398 4 жыл бұрын
this course is best ,ultimate best
@viditjain2508
@viditjain2508 3 жыл бұрын
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.
@hxrsh_x
@hxrsh_x 3 жыл бұрын
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 !!!
@sammygichuki8349
@sammygichuki8349 3 ай бұрын
Everytine i visit your videos i realise there so many things left out in sololearn do u offer classes on smart phone
@vvkwadhwa
@vvkwadhwa 4 жыл бұрын
As per example the data came at once for all, so how do we differentiate between iterator and generator.
@kiraninam
@kiraninam 4 жыл бұрын
the best explanation on the internet. good job
@yogeerao9149
@yogeerao9149 2 жыл бұрын
Hey Naveen Coz of You I have learned Python and Django perfectly Thank You So Much :-) Love from Hyderabad 😍
@durgaprasadsriramoji5111
@durgaprasadsriramoji5111 3 жыл бұрын
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
@creativemind4608
@creativemind4608 3 жыл бұрын
Excellent explanation.. Thanku..
@chhavimanichoubey9437
@chhavimanichoubey9437 4 жыл бұрын
def table(): n = int(input('enter value to find table of it:')) itt = 1 while itt
@hritikbhagatofficial
@hritikbhagatofficial 5 жыл бұрын
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.
@skrishnan9625
@skrishnan9625 4 жыл бұрын
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.
@firsttouse6465
@firsttouse6465 4 жыл бұрын
+++ 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
@BalajiChopparapu
@BalajiChopparapu 3 жыл бұрын
This is awesome explanation. Keep going. It helps python community
@user-ww2lc1yo9c
@user-ww2lc1yo9c 2 жыл бұрын
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?
@Natural__1
@Natural__1 5 жыл бұрын
Good job
@dikshantgupta5539
@dikshantgupta5539 4 жыл бұрын
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
@sourabhsharma9830
@sourabhsharma9830 11 ай бұрын
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.
@narendrababu2076
@narendrababu2076 2 жыл бұрын
sir u r looking different in this vedio
@vihalrao1870
@vihalrao1870 3 жыл бұрын
can we use genrator inside the class ? if yes anyone explain me with example?
@skviknesh
@skviknesh 2 жыл бұрын
Clean Explanation!!!
@ck3908
@ck3908 4 жыл бұрын
Thank u Sir!
@dhairyashah1746
@dhairyashah1746 4 жыл бұрын
why can't we use a for loop here instead of while loop? pls explain
@tanishlahoti5277
@tanishlahoti5277 3 жыл бұрын
sir the same thing be done without yield
@rahulagarwal7182
@rahulagarwal7182 3 жыл бұрын
Great Video
@kundrapuharika6294
@kundrapuharika6294 9 ай бұрын
Thank you sir
@snehashishpattnaik3824
@snehashishpattnaik3824 2 жыл бұрын
great to understand
@hritikbhagatofficial
@hritikbhagatofficial 5 жыл бұрын
good job
@venkateswarluguntaka7370
@venkateswarluguntaka7370 4 жыл бұрын
@sathvikmalgikar2842
@sathvikmalgikar2842 2 жыл бұрын
you are superb sir
@Rahu923
@Rahu923 5 жыл бұрын
Hii sr pls sr help me sr muje ye nhi Pata chl rha he ki me computer programing me ky kru...
@KoreaRwkz
@KoreaRwkz 4 жыл бұрын
5:10 So an iterator fetches all items in a sequence first?
@mdbhardwaj5005
@mdbhardwaj5005 3 жыл бұрын
Yup.
@rtpictures6858
@rtpictures6858 2 жыл бұрын
so what i don't get is that where we can use this
@RK-ce8mu
@RK-ce8mu 4 жыл бұрын
superb
@user-bc6ec6xk8t
@user-bc6ec6xk8t 2 ай бұрын
Sir I'm confused about the use of yield ,in place of that we will write return statement still it works.. please reply to my as soon as possible....
@believer2023_
@believer2023_ 2 ай бұрын
If you write return that it's a simple function and it no longer remains a generators. Using keyword yield makes it a generator. Now when you use return it's a simple function where you can use for loop to get the values. But when you're making it a generator you can fetch values one by one because of the yield keyword. Since yield keyword has inbuilt iter() method and you don't need to define iter() method specifically. Yield generate iterator objects(values).
@user-nd2sm2tc7u
@user-nd2sm2tc7u 8 ай бұрын
Thanks
@aritrodas2264
@aritrodas2264 3 жыл бұрын
Can we write this statement instead of the while loop? for i in range (1,11): sq=i*i yield sq
@RANDOMSTUFF-my3yd
@RANDOMSTUFF-my3yd 3 жыл бұрын
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. ✌
@kavnainvohra8228
@kavnainvohra8228 3 жыл бұрын
@@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!
@user-kb9tz7pp9y
@user-kb9tz7pp9y 3 жыл бұрын
can someone clarify..why is while being executed once at a time??
@dadivenkat4213
@dadivenkat4213 3 жыл бұрын
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
@ashishpatil79
@ashishpatil79 Жыл бұрын
when you use yield it will return iterator
@simarjitkaur2864
@simarjitkaur2864 4 жыл бұрын
you are amazinggggggggggggggggggggggggggggg
@madhavisasanka9433
@madhavisasanka9433 3 жыл бұрын
if we can use for loop then what is the need of next(). can you please clarify
@vojtechbrecka201
@vojtechbrecka201 3 жыл бұрын
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!
@sheikhjebran9447
@sheikhjebran9447 3 жыл бұрын
Awesome
@ROHIT-gv7xk
@ROHIT-gv7xk 4 жыл бұрын
great
@prateekmaurya4187
@prateekmaurya4187 3 жыл бұрын
make series on python turtle
@indrajitauddy6958
@indrajitauddy6958 Жыл бұрын
Understood... Thanks :)
@computertech1640
@computertech1640 5 жыл бұрын
Good
@ankitachauhan6780
@ankitachauhan6780 2 жыл бұрын
Why do we need generator and iterator ,if we can iterate using loops
@aghilpwilson879
@aghilpwilson879 2 жыл бұрын
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
@jyoshnadeepala4439
@jyoshnadeepala4439 2 жыл бұрын
to iterate not just int or any built in types, but iterate our own class ojects
@freemanfreed1581
@freemanfreed1581 2 жыл бұрын
so for loops are iterator implementations ???
@offlinedropx3780
@offlinedropx3780 2 жыл бұрын
yes
@artisticw1zard
@artisticw1zard 5 жыл бұрын
ha ha. i knew it. iterator --> generator
@vivekyadav2566
@vivekyadav2566 Жыл бұрын
Gr8 💯✨ thnk u
@Aris-lq7xe
@Aris-lq7xe 6 ай бұрын
greast vid 😃
@balireddyyerabham331
@balireddyyerabham331 3 жыл бұрын
SUPER SIR
@nithinmamidala
@nithinmamidala 4 жыл бұрын
hi..is it really necessary to have a knowledge on full python for data science..
@sivaprakash2247
@sivaprakash2247 4 жыл бұрын
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:-)
@saurabhtripathi62
@saurabhtripathi62 4 жыл бұрын
thanks
@sheikwaris
@sheikwaris 4 жыл бұрын
if i replace yield using return then the code is failing - 'int' object is not iterable - pls stat whats issue here
@manideepthatikonda4199
@manideepthatikonda4199 3 жыл бұрын
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)
@anandmm1712
@anandmm1712 3 жыл бұрын
Sir O/p may be 1,2,1,2,3,4 right
@anandmm1712
@anandmm1712 3 жыл бұрын
Because __next__ method wil preserve old values ... You told sir
@madhuyagadasu5963
@madhuyagadasu5963 Жыл бұрын
Why do we use iterators and generators in real life?
@shahporanhimel9207
@shahporanhimel9207 2 жыл бұрын
class twenty(): n=1 while n
@CSREVATHIV
@CSREVATHIV 10 ай бұрын
No because of you do not using class using def()
@DragonRazor9283
@DragonRazor9283 3 жыл бұрын
Thanks!
@SIISKSARAVINDAKASHYAP
@SIISKSARAVINDAKASHYAP 3 жыл бұрын
I didn't get the difference between this iterator and generator.. Can anyone help me out with this!!!!
@nakshatranahar
@nakshatranahar 5 жыл бұрын
dammmm nice
@mad8ry
@mad8ry 4 жыл бұрын
Eeeeeld = yield ?! which means Eellow = yellow
@phananh8589
@phananh8589 4 жыл бұрын
what 's an explanation, pretty excellent!
@thesupeprenure3729
@thesupeprenure3729 5 жыл бұрын
Which ide you are using
@mayurchaudhari332
@mayurchaudhari332 5 жыл бұрын
pyCharm I guess
@vijayaiyappa429
@vijayaiyappa429 5 жыл бұрын
Pycharm
@madhursharma8217
@madhursharma8217 4 жыл бұрын
Why not class?
@saitanush9453
@saitanush9453 3 жыл бұрын
tq
@prasadmanedeshmukh5905
@prasadmanedeshmukh5905 3 жыл бұрын
fantastic concept!!!
@domoreofficial
@domoreofficial 4 жыл бұрын
informational video, but the music at the start and end irritates. overall it's a nice video... thanks
@karthik2886
@karthik2886 4 жыл бұрын
you are looking like shikhar dhawan
@moritzr466
@moritzr466 6 ай бұрын
its pronounced Yield, not Eld
#63 Python Tutorial for Beginners | Exception Handling
15:59
Telusko
Рет қаралды 489 М.
#61 Python Tutorial for Beginners | Iterator
10:48
Telusko
Рет қаралды 331 М.
Uma Ki Super Power To Dekho 😂
00:15
Uma Bai
Рет қаралды 54 МЛН
Когда на улице Маябрь 😈 #марьяна #шортс
00:17
Python Decorators in 15 Minutes
15:14
Kite
Рет қаралды 419 М.
Advanced Python Series - Iterators Vs Generators
16:18
Krish Naik
Рет қаралды 47 М.
Python Generators Explained
28:37
Tech With Tim
Рет қаралды 141 М.
PLEASE Use These 5 Python Decorators
20:12
Tech With Tim
Рет қаралды 85 М.
Iterators vs. Generators in Python : Data Science Code
12:37
ritvikmath
Рет қаралды 16 М.
#43 Python Tutorial for Beginners | Filter Map Reduce
11:34
Telusko
Рет қаралды 558 М.
Пленка или защитное стекло: что лучше?
0:52
Слава 100пудово!
Рет қаралды 1,9 МЛН
Apple watch hidden camera
0:34
_vector_
Рет қаралды 13 МЛН
Which Phone Unlock Code Will You Choose? 🤔️
0:14
Game9bit
Рет қаралды 9 МЛН
Пленка или защитное стекло: что лучше?
0:52
Слава 100пудово!
Рет қаралды 1,9 МЛН