Used by echoes: as code form : repr « Buildin Function « Python






Used by echoes: as code form

Used by echoes: as code form
num = 1 / 3.0

print repr(num)               # used by echoes: as code form

           
       








Related examples in the same category

1.Input and Output: repr(): generate representations which can be read by the interpreter Input and Output: repr(): generate representations which can be read by the interpreter
2.str() and repr(): Strings and floating point numbers, have two distinct representations.str() and repr(): Strings and floating point numbers, have two distinct representations.
3.The repr() of a string adds string quotes and backslashesThe repr() of a string adds string quotes and backslashes
4.Here are two ways to write a table of squares and cubes
5.Output Formatting: reprOutput Formatting: repr