Q. What are literals in Python? How many types of literals are allowed in Python?


Answer =

Literals mean constants i.e., the data items that never change their value during a program run. Python allows five types of literals:

(i) String literals
(ii) Numeric literals
(iii) Boolean literals
(iv) Special Literal None
(v) Literal Collections like tuples, lists etc.

Post a Comment

You can help us by Clicking on ads. ^_^
Please do not send spam comment : )

Previous Post Next Post