Computer Science, asked by dapoda38, 3 months ago

What are tokens in Python? Name the types of tokens which are

allowed in Python?​

Answers

Answered by moriumnasam
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