So now we know how to write comments in Python, right? We use the #
symbol to make computers ignore certain parts of the code.
Engagement Message
Do you remember what's their main purpose?
So far, we've worked with different kinds of information, like text in quotes ("Hello"
) and whole numbers (42
).
Python treats these different kinds of information distinctly. They belong to different categories or types.
Engagement Message
Does this idea of categories make sense?
Text enclosed in quotation marks, like "Space Traveler"
or "Python"
, is called a string. Think of it as a string of characters. In Python code, this type is often abbreviated as str
.
Engagement Message
Is "123"
a string or a number according to this definition?
Whole numbers, like 10
, 0
, or 999
, without any decimal points and quotes around them, are called . In Python code, this type is often abbreviated as .
