Simple python function for getting a yes or no answer.

1
2
def yes_or_no(question):
reply = str(raw_input(question+' (y/n): ')).lower().strip()
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
Really simple python function for getting a yes or no answer.

Be the first to comment

You can use [html][/html], [css][/css], [php][/php] and more to embed the code. Urls are automatically hyperlinked. Line breaks and paragraphs are automatically generated.