What are tokens in Python? Name the types of tokens which are
allowed in Python?
Answers
Answered by
1
Answer:
Tokens are the smallest elements of a program, which are meaningful to the compiler.
There're 5 types of tokens allowed in Python.
Which are-
Keywords : for, del, elif, else etc.
Identifiers : Variable names like balance, class names like Vehicle etc.
Literals : String, Numeric, Boolean like ‘abcd’, None etc.
Operators : Unary, Binary, Bitwise like ‘+’, ‘&’, ‘^’ etc
Punctuators : Symbols like ‘#’, ‘(‘, ‘[‘, ‘=’ etc.
Explanation:
It just try to explain theory base form.
Similar questions
English,
1 month ago
Social Sciences,
1 month ago
Chemistry,
3 months ago
Physics,
3 months ago
Math,
9 months ago
Social Sciences,
9 months ago