Working yet not working?


15 String Formatting with %, Part 2

It works a first then it says
Traceback (most recent call last):
File "python", line 6, in
TypeError: unsupported operand type(s) for &: 'str' and 'tuple'

name = raw_input("What is your name?")
quest = raw_input("What is your quest?")
color = raw_input("What is your favorite color?")

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


You have & (name, quest, color) change & to %.


This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.