Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...


Explain the role of repr function.



Explain the role of repr function...

Answer / 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

More Python Interview Questions

How is an empty tuple created?

0 Answers  


What is docstring in Python?

0 Answers  


What is deep copy in python?

0 Answers  


Differentiate between split(), sub(), and subn() methods of the re module?

0 Answers  


How to add an index, row or column to a pandas dataframe?

0 Answers  


Name different types of inheritance in python?

0 Answers  


What is the function of negative index?

1 Answers  


What is the module and package in python?

0 Answers  


How python maintains conditional blocks?

0 Answers  


What are special methods in python and how to implement?

0 Answers  


Is python strongly typed or weakly typed language?

0 Answers  


What are membership operators in python?

0 Answers  


Categories