How to make string check case insensitive?

前端 未结 4 643
难免孤独
难免孤独 2020-12-05 11:15

I\'ve started learning Python recently and as a practise I\'m working on a text-based adventure game. Right now the code is really ineffective as it checks the user responce

4条回答
  •  猫巷女王i
    2020-12-05 11:52

    use str.lower() to convert all entries to lowercase and only check the string against lower case possibilities.

提交回复
热议问题