Write More Pythonic Code (Learning Path) – Real Python
By Real Python
5 - 6 minutes
Learning Path ⋅ Skills: Best Practices, Writing Idiomatic Python
With this learning path you’ll get a guided tour through Python’s most valuable best practices so you can write write clean, readable, and Pythonic code.
Learn how to write Python comments that are clean, concise, and useful. Quickly get up to speed on what the best practices are, which types of comments it's best to avoid, and how you can practice writing cleaner comments.
Course
Learn how to write high-quality, readable code by using the Python style guidelines laid out in PEP 8. This course outlines the key guidelines laid out in PEP 8. It's aimed at beginner to intermediate programmers.
Course
Make your loops more Pythonic and learn how you can get the most out of using range(), xrange(), and enumerate(). You'll also see how you can avoid having to keep track of loop indexes manually.
Course
This short course breaks down Python list comprehensions for you step by step. See how Python's comprehensions can be transformed from and to equivalent "for"-loops so you'll know exactly what's going on behind the scenes.
Course
Python Idioms for people coming from other languages and how to improve your idiomatic practices with Python. We will cover things to do with string concatenation, dictionary look ups, dealing with Python scripts and encoding.
Course
As of Python 3.6, f-strings are a great new way to format strings. Not only are they more readable, more concise, and less prone to error than other ways of formatting, but they are also faster! By the end of this course, you'll know how and why to s
Tutorial
A complete guide to documenting Python code. Whether you're documenting a small script or a large project, whether you're a beginner or seasoned Pythonista, this guide will cover everything you need to know.
Tutorial
In this step-by-step tutorial, you'll learn how to refactor your Python application to be simpler and more maintainable and have fewer bugs. You'll cover code metrics, refactoring tools, and common anti-patterns.
Tutorial
A reference guide to common Python application layouts and project structures for command-line applications, web applications, and more.
Tutorial
In this step-by-step tutorial, you'll learn how to take your Python coding interview skills to the next level and use Python's built-in functions and modules to solve problems faster and more easily.
Tutorial
See how to improve the quality of your Python code. We'll analyze and compare tools you can use to take your code to the next level and make it more Pythonic.
Course
In this course you'll see how to install and set up the PyLint code linter tool. You'll learn why you should use code linters like PyLint, Flake8, PyFlakes, or other static analysis tools.