pbojinov
3/27/2014 - 5:48 AM

string formatting in python

string formatting in python

# The sophosticated way

formatted_string = "My {0} has {1} whiskers and {2} paws".format('cat', 30, 4)
print formatted_string