Ad
Code
Diff
  • def simon_says(action: str):
        if action.lower().startswith('simon says') and action[10] in ' ,':
            return action[11:].strip(', "')
        else:
            return 'You didn\'t say, "Simon says"!'
    • def simon_says(action: str):
    • if action.lower().startswith('simon says') and action[10] in ' ,':
    • return action[len('simon says'):].strip(', "')
    • return action[11:].strip(', "')
    • else:
    • return 'You didn\'t say, "Simon says"!'