print & string formatting

Sharan Basappa sharan.basappa at gmail.com
Sun Jul 22 00:33:59 EDT 2018


Folks,

I get a lot confused while using print functions in Python.

For example, I get the same results for the following code:

str = "one two three"

print str
print "%s" %(str)

So, what is the need to use the second method which I see being used in many programs I am referring to



More information about the Python-list mailing list