What is meant by token ? Name th
tokens available in Python.
Share
What is meant by token ? Name th
tokens available in Python.
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
The smallest individual unit in a program is known as a token. There are five types of tokens allowed in Python. They 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.