Introduction
Displaying values
Variables
The print function
List basics
15. Comments in Python
Summary

Instruction

Good! Before we start working with lists, we’ll introduce comments. Comments are pieces of code that are ignored by Python. You can use them to describe what your code does or to quickly comment out some lines of the code when you experiment.

# store the vin of the car we're looking for
car_vin = 'GH665SD'

Comments are introduced with a hash sign (#). They can take a whole line, or begin in the middle of the line. Whatever is put to the right of the hash sign is ignored by Python.

Exercise

Look at the template code. Comment out the following line and observe what is shown in the output console:

turtle_lifespan = turtle_lifespan + 40

Stuck? Here's a hint!

Simply put a hash sign in front of the line where the lifespan is increased.