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?

Answer Posted / 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       View All Answers


Please Help Members By Posting Answers For Below Questions

How to prevent blocking in content() method of socket?

911


What is a raw input?

863


What does head () do in python?

844


Explain docstring in python?

879


How would you check if MySQLdb is installed?

1031


Explain the use of ternary operator in python?

935


What is the __ init __ method used for?

893


How to save an image when you know the url?

783


How do you get all values from a python dictionary?

845


How do you alphabetize a list in python?

899


What should I learn in python?

952


What is dogpile mechanism? Explain.

946


Does .net support python?

843


Does python supports interfaces like in java or c#?

872


What is the zip() function in python?

994