Intermediate Python
The guide to intermediate Python concepts in PDF, ePub, and HTML formats.
The Table of Contents are:
1. *args and **kwargs
1.1. Usage of *args
1.2. Usage of **kwargs
1.3. Using *args and **kwargs to call a function
1.4. When to use them?
2. Debugging
3. Generators
3.1. Iterable
3.2. Iterator
3.3. Iteration
3.4. Generators
4. Map, Filter and Reduce
4.1. Map
4.2. Filter
4.3. Reduce
5. set Data Structure
6. Ternary Operators
7. Decorators
7.1. Everything in Python is an object:
7.2. Defining functions within functions:
7.3. Returning functions from within functions:
7.4. Giving a function as an argument to another function:
7.5. Writing your first decorator:
7.6. Decorators with Arguments
8. Global & Return
8.1. Multiple return values
9. Mutation
10. __slots__ Magic
11. Virtual Environment
12. Collections
12.1. defaultdict
12.2. counter
12.3. deque
12.4. namedtuple
12.5. enum.Enum (Python 3.4+)
13. Enumerate
14. Object introspection
14.1. dir
14.2. type and id
14.3. inspect module
15. Comprehensions
15.1. list comprehensions
15.2. dict comprehensions
15.3. set comprehensions
16. Exceptions
16.1. Handling multiple exceptions:
17. Lambdas
18. One-Liners
19. For - Else
19.1. else clause:
20. Python C extensions
20.1. CTypes
20.2. SWIG
20.3. Python/C API
21. open Function
22. Targeting Python 2+3
23. Coroutines
24. Function caching
24.1. Python 3.2+
24.2. Python 2+
25. Context managers
25.1. Implementing Context Manager as a Class:
25.2. Handling exceptions
25.3. Implementing a Context Manager as a Generator
The free online version can be accessed from here.
You'll get the full book in PDF, ePub, and Mobi formats