In this video I will cover the Itertools module from the Python standard library. Itertools is a collection of functions that can be used on iterables which are data structures that can be looped over.
The module is especially useful for big data tasks and for cases where there is a stream of data that needs to be handled. This is because itertools feature lazy evaluation which means elements are evaluated on the fly and means we don't need to store entire data structures in memory in order to do operations on them. All in all this also helps keep memory footprint small.
I cover a handful of methods with examples. Although it is termed Advanced, you can still follow along if you have basic Python skills.
00:00 Intro
00:57 Cartesian Product
01:40 Permutations
02:44 Combinations
03:15 Groupby - default key
04:21 Groupby - custom key
06:52 Count
07:29 Cycle
08:15 Repeat
08:33 Dropwhile
09:21 Takewhile
09:48 End
Please consider liking if you found the video useful and subscribe for more!
Subscribe here: / @haseebkamal
Sur cette page du site, vous pouvez voir la vidéo en ligne Itertools Python Programming Tutorial | Advanced Python durée heure minute seconde en bonne qualité , qui a été Téléchargé par l'utilisateur Haseeb Kamal 01 juillet 2023, Partagez le lien avec vos amis et connaissances, sur youtube cette vidéo a déjà été regardée 213 fois et il a aimé 6 téléspectateurs. Bon visionnage!