Having an issue coding string formating with %


Continuing the discussion from String Formatting with %, Part 2, I keep getting an error message!:

print "Ah, so your name is %s, your quest is %s, \
and your favorite color is %s." % (name, quest, color)

Note where we have substituted %s where ever a blank appears in the example? The last blank (outside of the string) only gets % to indicate the associated variable list.

split this topic #3

2 posts were split to a new topic: Name/quest/color portion