Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

python string interpolation

def two_fer(name="you"):
    #return "One for " + name + ", one for me."
    #return "One for %s, one for me." % name
    #return "One for {}, one for me.".format(name)
    return f"One for {name}, one for me."
Source by exercism.io #
 
PREVIOUS NEXT
Tagged: #python #string #interpolation
ADD COMMENT
Topic
Name
6+4 =