0

What are literals in python ? give examples

25th Aug 2020, 9:11 AM
zeeshan
zeeshan - avatar
3 Antworten
+ 2
A literal is a succinct and easily visible way to write a value. ... Some of the choices of types of literals are often integers, floating point, Booleans and character strings. Python support the following literals: String literals :: "halo" , '12345' Read more: https://www.google.com/url?sa=t&source=web&rct=j&url=http://net-informations.com/python/iq/literals.htm%23:~:text%3DA%2520literal%2520is%2520a%2520succinct,way%2520to%2520write%2520a%2520value.%26text%3DSome%2520of%2520the%2520choices%2520of,%2522halo%2522%2520%252C%2520%2712345%27&ved=2ahUKEwiEzKGMhrbrAhWRa8AKHeK9BhEQFjABegQIDhAF&usg=AOvVaw1K4iMutH3xdHKTv5woJPqi
25th Aug 2020, 9:36 AM
Nathaniel Temitope Ogunjobi
Nathaniel Temitope Ogunjobi - avatar
+ 1
25th Aug 2020, 9:15 AM
minirkk
minirkk - avatar
0
In a simple way that I have understood, a literal is a fixed value(just as a string) which is just opposite of a variable(whose contents can be changed and are defined) I think this is the simplest way to understand this If u like then upvote
25th Aug 2020, 9:17 AM
Ishan Kumar Gupta
Ishan Kumar Gupta - avatar