Python
Technology practice
Python Exercises
Practice your Python knowledge with focused interactive exercises, including quizzes and code-completion practice.
Build confidence by choosing a practice mode, then work through focused exercises for this technology.
203 total exercises
Focused practice
Choose your format
Practice the way you learn best
Choose a format that matches how you want to reinforce your skills.
Recently added
Latest exercises
A mixed stream of the newest exercises, with the practice mode clearly labeled.
- Quizzes Python Exercises Test your knowledge: ZIP archives with zipfile Check your understanding of ZIP member names, reading and writing modes, compression, validation, and safe extraction.
- Quizzes Python Exercises Test your knowledge: temporary files and directories Check your understanding of temporary workspaces, named and unnamed files, spooled storage, and safe cleanup.
- Quizzes Python Exercises Test your knowledge: TAR archives with tarfile Check your understanding of TAR modes, compression, TarInfo members, member streams, and safe extraction.
- Quizzes Python Exercises Test your knowledge: os.scandir() Check directory iteration, DirEntry type information, symlink handling, metadata caching, and filesystem errors.
- Quizzes Python Exercises Test your knowledge: high-level file operations Check your understanding of file copying, tree operations, deletion, disk usage, and safer archive extraction.
- Quizzes Python Exercises Test your knowledge: glob and fnmatch patterns Check how to find pathname matches, filter filename strings, handle recursive and hidden paths, and escape literal wildcard characters.
- Quizzes Python Exercises Test your knowledge: filesystem metadata Check stat results, mode helpers, timestamps, symbolic links, and portability.
- Quizzes Python Exercises Test your knowledge: filecmp comparisons Check shallow versus content comparison, cmpfiles results, directory-tree reports, caching, and tool selection.
Keep exploring
Explore the complete exercise library
Jump back to the main exercise hub to discover practice across every technology.