Having an issue coding string formating with %


#1

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


#2

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.


#3

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