Really nice talk, this made this topic so much clearer for me
@the-ghost-in-the-machine1108 Жыл бұрын
great lesson
@usf59144 жыл бұрын
3:23:00 __iter__ __next__ convert a yield function to class OR why we need yield
@BuvanAlmighty4 жыл бұрын
Learned a lot from this talk.. Very well presented
@mergen.t Жыл бұрын
2:40:00 yield from
@TreyHunner5 жыл бұрын
The course resources are at this URL: pycon2019.trey.io
@usf59144 жыл бұрын
list comprehensions 7:51 filter with list comprehension ***until 2:16:38 will undrstand blow topics !list : [x**2 for x in range(10)] [ ] !generator : (x**2 for x in range(10)) !!to reduce memory usage, generate numbers when is needed !!generator create a disposable lazy loop,that with " next function ", generate next item. !!! !! delete extra parantesis print(x**2 for x in range(10)) sum(x**2 for x in range(10)) !converting generator to list [x**2 for x in range(10)] list(x**2 for x in range(10)) !! two above is equal !tuple conversions tuple(x**2 for x in range(10)) _______ yield sign in traffic def count(n=0): print('start') while n