String Formating With %, Part 2 help please


String Formating with %, Part 2

File "python", line 6
"and your favorite color is _%s__." _%__ (name, quest, color)
SyntaxError: invalid syntax

not sure

Replace this line with your code. 
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)


_%__ (name, quest, color) // remove _ before  and after %

should look like

 % (name, quest, color)


thank you for your help!


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