Treading on Python - II - Book Summary

The following post contains a summary of the book titled Treading on Python II by Matt Harrison Programming Styles Python supports three types of programming paradigms Imperative/Procedural Object Oriented Declarative/Functional Iterator Protocol iter is a global built-in function that calls the object’s dunder method __iter__ Writing a for loop based on iterators 1 2 3 4 5 6 7 8 9 10 11 test = [1, 2, 4] for i in test: print(i) iterator = iter(test) while True: try: x = iterator.