home
clear breadcrumbs
search
login
 
print
Format specifiers: %d integer %f float %s string data = ("John", "Doe", 53.44) format_string = "Hello %s %s. Your current balance is $%s." print(format_string % data) Hello John Doe. Your current balance is $53.44. int = 1 str = "abc" print('%d is an int, %s is a string' % (int, str)) output: 1 is an int, abc is a string