Writing Comments in Python

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.

What’s Included:

Related Learning Paths:

About Jackie Wilson

Jackie teaches computer science full-time for Cecil College, and fell in love with Python many years ago when she realized it wasn't pseudocode, but an actual language.

» More about Jackie

Each tutorial at Real Python is created by a team of developers so that it meets our high quality standards. The team members who worked on this tutorial are:

Participant Comments

Avatar image for Abraham

Abraham on Nov. 21, 2021

Great tips on outlining and when to use multi-string comments! Thanks!

Avatar image for Tonya Sims

Tonya Sims on Aug. 6, 2019

Awesome video! I use comments quite often, possibly overuse them. Watching this helped me learn when and where to use then.

Avatar image for TheCthulhuKid

TheCthulhuKid on April 5, 2019

A video I wish I had seen when I started =) Cheers!

Avatar image for Jaya Z

Jaya Z on March 29, 2019

This was wonderful Jackie!!

Avatar image for Chaitanya

Chaitanya on March 21, 2019

A nice way of explaining about comments, especially the purposes listed down is awesome :)

Avatar image for SamR

SamR on March 15, 2019

Very useful, thanks!

Avatar image for Edgar Isai

Edgar Isai on March 15, 2019

Thank you, these are very helpful tips.

← Browse All Courses