syntax difference

Sharan Basappa sharan.basappa at gmail.com
Sat Jun 16 15:01:16 EDT 2018


Is there a difference between these prints. The first one looks a bit complex. So, why should it be used?

my_age = 35 # not a lie

print "my age %s." % my_age
print "my age ", my_age

Output:
%run "D:/Projects/Initiatives/machine learning/programs/five.py"
my age 35.
my age  35



More information about the Python-list mailing list