Python by Swaroop C H - HTML preview

PLEASE NOTE: This is an HTML preview only and some elements such as links or page numbers may be incorrect.
Download the book in PDF, ePub, Kindle for a complete version.

Literal Constants

An example of a literal constant is a number like 5,1.23,9.25e-3 or a string like'This is a string' or"It's a string!". It is called a literal because it is literal - you use its value literally. The number2 always represents itself and nothing else - it is a constant because its value cannot be changed. Hence, all these are referred to as literal constants.