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...


What is the difference between `__str__` and `__repr__` methods in Python?



What is the difference between `__str__` and `__repr__` methods in Python?..

Answer / nashiinformaticssolutions

`__str__` is used for creating a user-friendly string representation of an object. `__repr__` is used for creating a detailed string representation of an object, intended for debugging.

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More Python Interview Questions

How do I run a subprocess with pipes connected to both input and output?

0 Answers  


Do you know what the difference between lists and tuples is? Can you give

0 Answers  


What applications are written in python?

0 Answers  


Explain about negative indexing?

0 Answers  


Where is the math.py (socket.py, regex.py, etc.) Source file?

0 Answers  


how do I pass a variable by reference?

0 Answers  


How do you do data abstraction in python?

2 Answers  


What is the function of “self”?

1 Answers   Symphony,


Does python 2.7 come with pip?

0 Answers  


Tell me what is the difference between django, pyramid, and flask?

0 Answers  


How can you make modules in python?

0 Answers  


What is self in python constructor?

0 Answers  


Categories