Table of Contents
Just printing 'Hello World' is not enough, is it? You want to do more than that - you want to take some input, manipulate it and get something out of it. We can achieve this in Python using constants and variables.
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 number 2
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.