Я делаю текстовую приключенческую игру на python, и я рандомизировал ответ на каждый мой первый выбор (A, B, C), теперь давайте скажем, что он ничего не находит при выборе A. Как бы я в основном говорят,
"если ничего не найдено, (* вставьте другой список вариантов здесь *)"
в мой код? Кажется, я не могу найти ответ, так что я надеюсь, что кто-то здесь знает это, спасибо!
Вот мой код:
import time
import random
print ('You suddenly jolt up from the sleeping bag, awoken by the howling of nearby wolves.\nYou are cold, shivering and starving, and the few things that are still visible,\nare lit up only by the moon, and notice you are in the middle of a forest.\n')
ch1 = str(input(' Do you: \nA: Use your hands to search around\nB: Sleep again until morning\nC: Get up, and attempt to run away from the wolves in the dark:\n'))
responsesA = [
'You found a torch!',
'You did not find anything.'
]
responsesB = [
'You fell asleep again cold and hungry.',
'You are unable to sleep.'
]
responsesC = [
'You start running as fast as you can and successfuly escape!',
'You trip and injure knee.'
]
if ch1 in ['A']:
print (random.choice(responsesA))
if ch1 in ['B']:
print (random.choice(responsesB))
if ch1 in ['C']:
print (random.choice(responsesC))
Что-нибудь, что я должен изменить?