GitHub - labex-labs/python-cheatsheet: A comprehensive Python cheat sheet with code examples, built-in functions, module references, and hands-on labs by LabEx. · GitHub
Skip to content

About

A comprehensive Python cheat sheet with code examples, built-in functions, module references, and hands-on labs by LabEx.

Topics

Resources

Code of conduct

Stars

5.0k stars

Watchers

97 watching

Forks

Latest commit

 

History

1,838 Commits

Folders and files

Repository files navigation

Python Cheatsheet

Python Cheatsheet is a comprehensive reference guide for Python developers of all skill levels. Based on the book Automate the Boring Stuff with Python and many other sources, this cheatsheet provides a quick reference for common Python tasks and concepts.

Anyone can forget how to make character classes for a regex, slice a list, or do a for loop. This Python cheatsheet tries to provide basic reference for beginner and advanced developers, lower the entry barrier for newcomers and help veterans refresh the old tricks.

Features

  • Comprehensive Coverage: From basics to advanced topics including built-in functions, control flow, data structures, and more
  • Built-in Functions Reference: Detailed documentation for all Python built-in functions
  • Module Documentation: Guides for popular Python modules like datetime, json, pathlib, itertools, and more
  • Blog Articles: In-depth articles about Python and its ecosystem
  • Easy Navigation: Well-organized sections with clear examples and explanations
  • Dark Mode Support: Beautiful UI with light and dark themes

Hands-on Labs on LabEx

Practice the concepts in this cheat sheet with interactive labs in your browser. Follow the Python Cheatsheet course on LabEx, or choose a lab below. Each topic links to its reference page on the Python Cheat Sheet website; the VS Code lab helps you get started with your development environment.

Topic Cheat Sheet Reference Practice
Use VS Code for Python Development — Start Lab
Python Basics Read reference Start Lab
Python Built-in Functions Read reference Start Lab
Python Control Flow Read reference Start Lab
Python Functions Read reference Start Lab
Python Lists and Tuples Read reference Start Lab
Python Dictionaries Read reference Start Lab
Python Sets Read reference Start Lab
Python Comprehensions Read reference Start Lab
Python String Manipulation Read reference Start Lab
Python String Formatting Read reference Start Lab
Python Regular Expressions Read reference Start Lab
Python File and Directory Path Manipulation Read reference Start Lab
Python Reading and Writing Files Read reference Start Lab
Python JSON and YAML Read reference Start Lab
Python Exception Handling Read reference Start Lab
Python Debugging Read reference Start Lab
Python Args and Kwargs Read reference Start Lab
Python Decorators Read reference Start Lab
Python Context Manager Read reference Start Lab
Python OOP Basics Read reference Start Lab
Python Dataclasses Read reference Start Lab
Python Packaging Read reference Start Lab
Python Main Function Read reference Start Lab
Python Virtual Environments Read reference Start Lab

Quick Links

  • View on GitHub: Drop a star on GitHub if you find this project useful
  • Contribute: Get to know how easy it is to contribute to the Python Cheatsheet
  • Blog: Read detailed articles about Python and its ecosystem
  • Changelog: See what is new, what got fixed, and what is coming

Contributing

Contributions are welcome! Please see the Contributing Guide for details on how to get started.

License

Content is licensed under MIT and maintained by the LabEx team.

More Cheatsheets

About

A comprehensive Python cheat sheet with code examples, built-in functions, module references, and hands-on labs by LabEx.

Topics

Resources

Code of conduct

Stars

5.0k stars

Watchers

97 watching

Forks

Used by

Contributors

Languages