yes = set(['yes','y', 'ye', ''])
no = set(['no','n'])
choice = raw_input().lower()
if choice in yes:
return True
if choice in no:
return False
else:
sys.stdout.write("Please respond with 'yes' or 'no'")
私はそれが私のインデントだと思っていましたが、まだ動作させることができません。おそらく非常に単純なものです。これを後で別のファイルのベースとして使用しているので、動作することを確認する必要があります。