Computer Science, asked by raghav9270, 1 year ago

what are tokens in python? how many types of tokens are allowed in python? exemplify your answer​

Answers

Answered by Anshyadav1234
54

Explanation:

tokens are smallest individual units in programming.

types are:

- variable

- identifier

- keyword

- datatype

- operater

- punctuater

- literals

Answered by jagriti61
70

Answer:

tokens are the smallest unit of the program.

1. keywords

keywords are nothing but a set of special words, which are reserved by Python and have specific meaning.

2. identifier

identifier in Python are nothing but user defined name to represent programmable entity like variable, function, classes, modules or any object.

3. literals

the other built in object in Python are literal. literal can be define as data that is given in a variable or constant. Python has following literal:-

(a) string

(b) numeric

(c) boolean

(d) collection

4. operators

operators are the symbols which performs the operation on some values. these values are known as operand.

I hope it is useful☺️

Similar questions