Answer Posted / chaitanya
Python can convert any value to a string by making use of two functions repr() or str().
The str() function returns representations of values which are human-readable, while repr() generates representations which can be read by the interpreter.
repr() returns a machine-readable representation of values, suitable for an exec command.
Following code sniipets shows working of repr() & str() :
| Is This Answer Correct ? | 0 Yes | 0 No |
Post New Answer View All Answers
What is jinja python?
How do I debug an extension?
Is python faster than python2?
What is pip?
What is pip software in the python world?
What is pickling and unpickling in python?
What is the meaning of a single- and a double-underscore before an object name?
How can you dynamically create variables in python via a while loop?
Python How to create a multidimensional list?
What is dictionary in python?
What is pyunit in python?
What is try block?
How do I run a python script?
Specify the differences between pyramid, django, and flask.
What are the built-in types of python?