Looking for reliable answers? Westonci.ca is the ultimate Q&A platform where experts share their knowledge on various topics. Connect with a community of experts ready to help you find solutions to your questions quickly and accurately. Get immediate and reliable solutions to your questions from a community of experienced professionals on our platform.

In Python, when do we use the str( ) function

Sagot :

Answer:

Both str () and repr () methods in python are used for string representation of a string.

Explanation:

Though they both seem to serve the same purpose, there is a little difference between them. Have you ever noticed what happens when you call a python built-in function str (x) where x is any object you want?