Practice Python
Every practice exercise of the course in one place. Filter by difficulty or topic, pick one and solve it in the full-screen editor.
- 493exercises
- 123Easy
- 261Medium
- 109Hard
Challenge of the day · 30 Nov
Count XML tags
Your progress by difficulty
to see your progress by difficulty.
Sign in493 exercises · Page 16 of 21
Capture the output
Context managers
Medium
Decorative frame
Context managers
Medium
Ignore errors
Context managers
Medium
Guaranteed cleanup
Context managers
Medium
Transaction with rollback
Context managers
Hard
Temporary setting
Context managers
Hard
Resource stack
Context managers
Hard
Error-aware log
Context managers
Hard
Read a traceback
Debugging and testing
Medium
Tracing a loop
Debugging and testing
Easy
Testing with assert
Debugging and testing
Easy
Text test table
Debugging and testing
Medium
Hunt the bug
Debugging and testing
Medium
Run tests with unittest
Debugging and testing
Medium
Logging records
Debugging and testing
Medium
Preconditions with assert
Debugging and testing
Easy
Boundary values
Debugging and testing
Easy
Floor, ceiling and truncation
Modules and imports
Easy
Greatest common divisor and least common multiple
Modules and imports
Medium
Combinations and permutations
Modules and imports
Medium
Six-sided die
Modules and imports
Medium
Reusable functions
Modules and imports
Medium
Dynamic import
Modules and imports
Medium
Importing only once
Modules and imports
Medium