Answers for "how to make multiple place holders in a string with %s python"

1

how to make multiple place holders in a string with %s python

a = 'bananas'
b = 'apples'
c = 'peaches'
print('I like to eat %s, %s and %s' %(a, b, c))
#Prints: I like to eat bananas, apples and peaches
Posted by: Guest on January-24-2021
1

how to make a string with many variables in python

var1 = “awesome”
var2 = “ever”
print “Codecademy has the most %s coding lessons %s!” % (var1, var2)
# displays: “Codecademy has the most awesome coding lessons ever!”
Posted by: Guest on August-27-2020

Code answers related to "how to make multiple place holders in a string with %s python"

Python Answers by Framework

Browse Popular Code Answers by Language