2️⃣

1.2 Comments

Comments

Comments are parts of your code that are ignored by the computer that runs your program. They are used to help clarify your code and make it more readable and easy to maintain.
To write single line comments in Python, use a #.
For multi-line comments in Python, use 3 single quotes (''') or 3 double quotes (""").
 
# Comments # This is a single line comment ''' This is a multi-line comment ''' """ This is also a multi-line comment """
View code on GitHub

Practice

Write Comments

Write 3 comments about anything that you want, like your daily routine or your favorite music artist.
 
⚖️
Copyright © 2021 Code 4 Tomorrow. All rights reserved. The code in this course is licensed under the MIT License. If you would like to use content from any of our courses, you must obtain our explicit written permission and provide credit. Please contact classes@code4tomorrow.org for inquiries.