Yes..! I got the real Krish who helps the needy Students .❤☺
@thalanayarswaminathansaipr77033 жыл бұрын
Excellent! One additional point a function can have many yield statements however, we can have only one return statement.
@lepidoptera9337 Жыл бұрын
Huh???? Where did you get this nonsense from? A function can have an arbitrary number of return statements. Multiple returns are functionally completely equivalent to a case statement or a series of if-then-else statements. A function can even have zero return statements. A function doesn't have to return a value. A function doesn't even have to finish. That's quite useful in multitasking systems that have to repeat the same functionality over and over again in the background.
@saurishreddy70232 жыл бұрын
nums = [i*i for i in [1,2,3,4,5]] for i in nums: print (i)
@sarikavaidya66812 жыл бұрын
You explained in very very simple and understanding manner ... thanks for making it
@tirthasg Жыл бұрын
Really? I found it to be quite confusing!
@ramarao_amara3 жыл бұрын
other than generator function , we can use generator comprehension also used for creating generators.
@AshisRaj Жыл бұрын
10:33 crux is here
@scortexfire2 жыл бұрын
8:40 def square(n): for i in range(n): return n**2 square(3) >>> 9 I'm getting 9 instead of 0. Why so?
@shaiksalman90102 жыл бұрын
in return put return i**2
@pokejishnu3 жыл бұрын
Wow this was much needed Krish sir. Thanks a lot
@shailajadavangave452 жыл бұрын
Hi Krishna , before gng for interview i hv gone through ur iterator vidoe and same concept asked in interview as i hv gone through ur iterator video i was able to explain well with an example of iterator.iterviewr was very much convenienced with the example and answer .Thanks for the amazing video very well explained. I am grateful to you for these videos and easy explanation
@lepidoptera9337 Жыл бұрын
As an interviewer I would have rejected you on your lack of communication skills alone. Life is not a series of smartphone texts. :-)
@bongmou28453 жыл бұрын
Thank you for the clarification , well explained .
@abhi902911 ай бұрын
superb lecture Krish.
@shahnawazkhan16363 жыл бұрын
Amazing krish
@pratyushbehere35803 жыл бұрын
Still don't understand where this will be used
@abhi7392 жыл бұрын
Thanks Krish, very good explanation
@ranjit94273 жыл бұрын
Why is Iterator more memory efficient compared to the Generator??
@prannoyroy53123 жыл бұрын
It is the other way round. Generators are memory-efficient ways of processing huge datasets. They process the data incrementally and do not allocate memory to all the results at the same time.
@abhishekjain76453 жыл бұрын
I bought the membership but I didn't received the study material
@krishnaik063 жыл бұрын
Check the community post
@animeshmishra42823 жыл бұрын
Best video needed it so much. Thankyou sir.🌟
@nashrahrahman35473 жыл бұрын
Sir, can you please make a video on decorators as well ??
@masterhipster83582 жыл бұрын
Plz tell if im wrong sir, In your 2 point yield save the local variable value. I think Yield hold the state of local variable.
@narangfamily766811 ай бұрын
Wonderful! Thank you so much.
@donfeto76363 жыл бұрын
Think about it generator is like yield return in c# which just return a list which you can iterate over it , multiple return rather than 1 return value
@kartiksharma-yw7qf3 жыл бұрын
Sir any update about data science 15 month course by ineuron?
@melodyofsoul4933 Жыл бұрын
I'm getting this error AttributeError: module 'collections' has no attribute 'Iterator' while calling this function issubclass(types.GeneratorType,collections.Iterator).
@sgn198911 ай бұрын
issubclass(types.GeneratorType, collections.abc.Iterator) should work
@saleemmohammad89862 жыл бұрын
Well explained Thanks
@rajinigd2 жыл бұрын
sir i have a query can you please share how to use the log values for a set of values in column
@shrinivas10862 жыл бұрын
for i in range(3): here "i" which will iterate through the range values. can we call that "i" as "iterator"? if not why?
@helovesdata8483 Жыл бұрын
No because I doesn't iterate through the range of values. i represents each individual value in the range from 0 to 2.
@vikinist3 жыл бұрын
Why not we do the same task with functions
@hassanhijazi475711 ай бұрын
As the 4th point, I think you mean the opposite, right?
@SigmaSid989 ай бұрын
One small correction: Generators are more memory efficient than iterators in python.
@abhinavlakhani56373 жыл бұрын
It looks like Iterators are using "linked lists" under the hood.🤔
@AnilKumar-do6nj3 жыл бұрын
Hi this is anil how to read directly excel sheet wise data without download excel file s3 bucket using python please explan
@AnilKumar-do6nj3 жыл бұрын
Thanks
@KairanaExpressIn3 жыл бұрын
I want to learn python in hy head, first learn html first or c language Please Reply
@mdmamun-vp9xj3 жыл бұрын
First viewer😘😍😍
@chinujaglan57823 жыл бұрын
ohhh
@amitsingh-ox4uo2 жыл бұрын
Didn't make any sense.Where is it used?
@MuhammadShahzad-dx5je3 жыл бұрын
#awesome
@swadhikarc78583 ай бұрын
Nice video krish. I can see the effort behind making people to understand 🫡
@navneetshrvstv5073 жыл бұрын
Generator is memory efficient not iterator
@chinujaglan57823 жыл бұрын
i was thinking i would be 1 st comment 1 like 1 view but in 18 second 18 view and 7 likes
@sampleraja80262 жыл бұрын
He has to know the difference and it's application. Video is not worth.
@abhidawkhar5105 Жыл бұрын
Too many adds
@gouravnandy5401 Жыл бұрын
Not a good way of teaching. Doesn't make any sense