My goal with this code is that when you insert a specific number, you will print the number and some other result based on what you typed. For some reason, what I have here is giving a "ValueError: incomplete format" error. This has something to do with%. What does the error mean, and how to fix it? Thanks!
variable = "Blah"
variable2 = "Blahblah"
text = raw_input("Type some stuff: ")
if "1" in text:
print ("One %" % variable)
elif "2" in text:
print ("Two %" % variable2)
source
share