How can I combine two print statements that both use string formatting?
The best way to demonstrate is with an example, check out the code below:
print “This is my first %s.” % (“string”) print “But I will be combined %s“ % (“one day soon!”) print “This is my first %s. But I will be combined %s” % (“string”, “one day soon!”)
We started off with two separate strings being formatted and simply combined the strings and variables being inserted. The lesson wants the same thing!