- 1. Functional programmin in Python
- 1.1. Programming Paradigms
- 1.2. Functional programming
- 2. Iterators (Iterables)
- 2.1. string
- 2.2. list
- 2.3. tuple
- 2.4. filehandle
- 2.5. range
- 2.6. range in details
- 2.7. index and len of a range
- 2.8. index and len of a filehandle
- 2.9. flattening a range with list()
- 2.10. The size of a range vs. list
- 3. map
- 3.1. for loop with transformation
- 3.2. map
- 3.3. map with list
- 3.4. size of map
- 3.5. map delaying function call
- 3.6. map on many values
- 3.7. double with lambda
- 3.8. What is lambda in Python?
- 3.9. lambda returning tuple
- 3.10. map returning tuples
- 3.11. lambda with two parameters
- 3.12. map for more than one iterable
- 3.13. map on uneven lists
- 3.14. replace None (for Python 2)
- 3.15. map on uneven lists - fixed (for Python 2)
- 3.16. map mixed iterators
- 3.17. map fetch value from dictionary
- 3.18. Exercise: string to length
- 3.19. Exercise: row to length
- 3.20. Exercise: compare rows
- 3.21. Solution: string to length
- 3.22. Solution: row to length
- 3.23. Solution: compare rows
- 4. filter
- 4.1. filter in a loop
- 4.2. filter
- 4.3. filter with lambda
- 4.4. filter - map example
- 4.5. filter - map in one expression
- 4.6. filter a dictionary using dict comprehension
- 4.7. Get indices of values
- 5. reduce
- 5.1. reduce
- 5.2. reduce empty list
- 5.3. reduce with default
- 5.4. reduce list of dictionaries
- 6. zip
- 6.1. zip
- 6.2. Combining two lists using zip
- 6.3. Creating dictionary from two lists using zip
- 7. all, any
- 7.1. Compare elements of list with scalar
- 8. List comprehension and generator expression
- 8.1. List comprehension - double
- 8.2. List comprehension - simple expression
- 8.3. List generator
- 8.4. List comprehension
- 8.5. Dict comprehension
- 8.6. Lookup table with lambda
- 8.7. Read lines without newlines
- 8.8. Read key-value pairs
- 8.9. Create index-to-value mapping in a dictionary based on a list of values
- 8.10. Exercise: min, max, factorial
- 8.11. Exercise: Prime numbers
- 8.12. Exercise: Many validator functions
- 8.13. Exercise: Calculator using lookup table
- 8.14. Exercise: parse file
- 8.15. Solution: min, max, factorial
- 8.16. Solution: Prime numbers
- 8.17. Solution: Many validator functions
- 8.18. Solution: Calculator using lookup table
- 9. Part 3
- 9.1. map with condition
- 9.2. map with lambda
- 9.3. map with lambda with condition
- 9.4. List comprehension - complex
- 9.5. Change list before iteration over map object
- 9.6. Replace list before iteration over map object
- 10. Iterators - with and without Itertools
- 10.1. Advantages of iterators and generators
- 10.2. The Fibonacci research institute
- 10.3. Fibonacci plain
- 10.4. Fibonacci copy-paste
- 10.5. Iterators Glossary
- 10.6. What are iterators and iterables?
- 10.7. A file-handle is an iterator
- 10.8. range is iterable but it is not an iterator
- 10.9. Range with floating point steps
- 10.10. Iterator: a counter
- 10.11. Using iterator
- 10.12. Iterator without temporary variable
- 10.13. The type of the iterator
- 10.14. Using iterator with next
- 10.15. Mixing for and next
- 10.16. Iterable which is not an iterator
- 10.17. Iterator returning multiple values
- 10.18. Range-like iterator
- 10.19. Unbound or infinite iterator
- 10.20. Unbound iterator Fibonacci
- 10.21. Operations on Unbound iterator
- 10.22. itertools
- 10.23. itertools - count
- 10.24. itertools - cycle
- 10.25. Exercise: iterators - reimplement the range function
- 10.26. Exercise: iterators - cycle
- 10.27. Exercise: iterators - alter
- 10.28. Exercise: iterators - limit Fibonacci
- 10.29. Exercise: iterators - Fibonacci less memory
- 10.30. Exercise: read char
- 10.31. Exercise: read section
- 10.32. Exercise: collect packets
- 10.33. Exercise: compare files
- 10.34. Solution: iterators - limit Fibonacci
- 10.35. Solution: iterators - Fibonacci less memory
- 10.36. Solution: read section
- 10.37. Solution: compare files
- 10.38. Solution: collect packets
- 11. Iterators
- 11.1. iterator - pairwise
- 11.2. iterator - grouped
- 11.3. itertools - groupby
- 11.4. itertools - izip
- 11.5. mixing iterators
- 11.6. mixing iterators
- 11.7. itertools - pairwise
- 11.8. itertools - grouped
- 11.9. alter iterator
- 11.10. Exercise: iterators - count
- 12. Generators and Generator Expressions
- 12.1. Generators Glossary
- 12.2. Iterators vs Generators
- 12.3. List comprehension and Generator Expression
- 12.4. List comprehension vs Generator Expression - less memory
- 12.5. List comprehension vs Generator Expression - lazy evaluation
- 12.6. Generator: function with yield - call next
- 12.7. Generators - call next
- 12.8. Generator with yield
- 12.9. Generators - fixed counter
- 12.10. Generators - counter
- 12.11. Generators - counter with parameter
- 12.12. Generators - my_range
- 12.13. Fibonacci - generator
- 12.14. Infinite series
- 12.15. Integers
- 12.16. Integers + 3
- 12.17. Integers + Integers
- 12.18. Filtered Fibonacci
- 12.19. The series.py
- 12.20. generator - unbound count (with yield)
- 12.21. iterator - cycle
- 12.22. Exercise: Alternator
- 12.23. Exercise: Prime number generator
- 12.24. Exercise: generator
- 12.25. Exercise: Binary file reader
- 12.26. Exercise: File reader with records
- 12.27. yield outside of functions
- 12.28. Operations on infinite lists
- 12.29. Infinite random number generator
- 12.30. Infinite random set generator
- 12.31. Simple function (before generators)
- 12.32. Filtered Fibonacci with ifilter