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 are uuid generated?

0 Answers  


What does quit () do in python?

0 Answers  


Do you know what is the key difference between a list and the tuple?

0 Answers  


Under what circumstances would von use a while statement rather than for?

0 Answers  


Narrate the difference between python arrays and lists.

0 Answers  


Write a program in python to check if a sequence is a palindrome.

0 Answers  


Which is better c++ or java or python?

0 Answers  


What is a cast in python?

0 Answers  


Why do we use uuid?

0 Answers  


Is there a switch or case statement in python?

0 Answers  


How do I create a variable number of variables?

0 Answers  


What is gil in python?

0 Answers  


Categories