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

When would you use triple quotes as a delimiter?

0 Answers  


What is the statement that can be used in python if the program requires no action but requires it syntactically?

0 Answers  


How does python input work?

0 Answers  


What are class or static variables in python programming?

0 Answers  


Does python have overloading?

0 Answers  


what does yield function do? what is the difference between return and yield?

1 Answers  


How do you exit a python script?

0 Answers  


What does input () do in python?

0 Answers  


Does python support interfaces like in java?

0 Answers  


How is numpy different from scipy?

0 Answers  


How you can convert a number to a string?

0 Answers  


What is class in python?

0 Answers  


Categories