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 to import a module given the full path?

0 Answers  


What is yield in python?

0 Answers  


What are the different ways to create an empty numpy array in python?

0 Answers  


Name the function which helps to change the files permission

0 Answers  


What is the sleeping time of python?

0 Answers  


What is a numpy array?

0 Answers  


What is the pythonpath variable?

0 Answers  


How do I create a python package in pycharm?

0 Answers  


Which oops talks about data hiding?

0 Answers  


What are tuples and relation?

0 Answers  


What are the steps required to make a script executable on Unix?

1 Answers  


Differentiate between deep and shallow copy in python?

0 Answers  


Categories