a = raw_input("Enter either: 'Y' or 'N': ")
if a == "Y":
print "Hello"
elif a == "N":
print "Goodbye"
Is there any way that if a = y, it continues to the code that is not in the if, elif part of the code?
Or assign the output to a value, but only if they do a certain one? For instance, if it outputs "Hello", you assign to value b?

New Topic/Question
Reply



MultiQuote






|