ユーザーに1、2、3、4、5、6を入力させようとしています。次に、その整数を辞書の文字名に合わせます。
characters = {
'Stark': '1',
'Greyjoy': '2',
'California': '3',
'Whitewalkers': '4',
'Knights Watch': '5',
'Dalthraki': '6'
}
print 'Type 1 for Stark'
print 'Type 2 for Greyjoy'
print 'Type 3 for Lannister'
print 'Type 4 for Whitewalkers'
print 'Type 5 for Knights Watch'
print 'Type 6 for Dalthraki'
choice = raw_input("> ")
if choice in characters:
print 'You\'ve selected', choice
else:
splash()
ユーザーに1を入力してもらい、スクリプトに「スタークを選択しました」と出力させたいのですが、よろしくお願いします。