CBSE Class 11 Computer Science
Question 52 of 106
Python Fundamentals — Question 1
Back to all questions 1
Question Question 1
What are tokens in Python ? How many types of tokens are allowed in Python ? Examplify your answer.
The smallest individual unit in a program is known as a Token. Python has following tokens:
- Keywords — Examples are import, for, in, while, etc.
- Identifiers — Examples are MyFile, _DS, DATE_9_7_77, etc.
- Literals — Examples are "abc", 5, 28.5, etc.
- Operators — Examples are +, -, >, or, etc.
- Punctuators — ' " # () etc.