Answers for "Multiples placeholders in python Formatters"

0

Multiples placeholders in python Formatters

#Using multiple placeholders with str.format() method
new_open_string = "Sammy loves {} {}."                      #2 {} placeholders
print(new_open_string.format("open-source", "software"))    #Pass 2 strings into method, separated by a comma
Posted by: Guest on September-10-2021

Python Answers by Framework

Browse Popular Code Answers by Language