Page 423 - ComputerScience_Class_11
P. 423
Output
30
12.8.2 Uses of Multi-line Comments
Here are some uses of multi-line comments:
• To explain large blocks of code
• To write detailed program descriptions
• To improve code readability
• Useful for documentation purposes
12.9 TOKENS IN PYTHON
In Python, a token is the smallest meaningful unit of a program. When we write a Python statement, the interpreter
breaks it into small parts called tokens before executing it. These tokens help Python understand the structure of the
program.
In simple words, everything written in a Python program is made up of tokens.
There are different types of tokens in Python:
• Keywords
• Identifiers
• Literals
• Operators
• Punctuators (Separators)
12.9.1 Keywords
Keywords, also known as reserved words, are words that have a fixed meaning and specific use in a programming
language. The language defines their purpose, so they can't be used for naming variables or functions. Every
programming language has its own set of keywords.
The different types of keywords in Python are listed below:
False None True and
as assert async await
break class continue def
del elif else except
finally for from global
if import in is
lambda nonlocal not or
pass raise return try
while with yield
For example,
if a > b:
print("a is greater")
Installation & IDE and Fundamentals of Python Programming 421

