Idiomatic Python: Generators

Veröffentlicht am: 04 August 2023
auf dem Kanal: MathByte Academy
2,134
95

In this video we take a look at how to write more Pythonic code by leveraging generator expressions and functions.

Most iteration related functions in Python are essentially generators (like zip, enumerate, islice, and many many more).

There's a reason for that, and we also explore those reasons in this video.

#mathbyteacademy #python

Content
=======
00:00 - Introduction
00:19 - Generator expressions
09:32 - Using itertools.islice
12:00 - Generator functions
15:00 - Context managers
18:26 - Generator based context managers
25:50 - Review of CSV readers and writers
28:51 - CSV application of generator based context managers
36:34 - Context managers conclusion
37:31 - Conclusion


Code for this Video
===================
Available in GitHub blog repo: https://github.com/fbaptiste/python-blog
Direct link: https://tinyurl.com/34jdxhd8

My Python Courses
=================

Python 3 Fundamentals (introduction to Python)
https://www.udemy.com/course/python3-...

Python 3 Deep Dive (Part 1 - Functional)
https://www.udemy.com/course/python-3...

Python 3 Deep Dive (Part 2 - Iteration, Generators)
https://www.udemy.com/course/python-3...

Python 3 Deep Dive (Part 3 - Hash Maps)
https://www.udemy.com/course/python-3...

Python 3 Deep Dive (Part 4 - OOP)
https://www.udemy.com/course/python-3...


Auf dieser Seite können Sie das Online-Video Idiomatic Python: Generators mit der Dauer stunde minuten sekunde in guter Qualität ansehen, das der Benutzer MathByte Academy 04 August 2023 hochgeladen hat, den Link mit Freunden und Bekannten teilen, dieses Video wurde auf Youtube bereits 2,134 Mal angesehen und es wurde von 95 den Zuschauern gefallen. Viel Spaß beim Betrachtenden Zuschauern gefallen!