Mar-26-2017, 08:38 PM
Please do not PM members for answers, it defeats the purpose of the forum.
Your code is quite difficult to follow, using to similar variable names, for instance 'word' and 'words'. Be inventive, instead use something like 'word_list = ', 'random_word = ' and so on. Also, you don't want to use Python words as variables, for example, 'index' is a list attribute
Your code is quite difficult to follow, using to similar variable names, for instance 'word' and 'words'. Be inventive, instead use something like 'word_list = ', 'random_word = ' and so on. Also, you don't want to use Python words as variables, for example, 'index' is a list attribute
my_list = [1, 2, 3] my_list.index(1) # Will return '0'. Remember, indexes start with '0', not '1'Your problem lies in your while/try/except clause. So as nilamo suggested, where would be a good place (or places) to put a 'print' to test the value of the variable that puts you there?
If it ain't broke, I just haven't gotten to it yet.
OS: Windows 10, openSuse 42.3, freeBSD 11, Raspian "Stretch"
Python 3.6.5, IDE: PyCharm 2018 Community Edition
OS: Windows 10, openSuse 42.3, freeBSD 11, Raspian "Stretch"
Python 3.6.5, IDE: PyCharm 2018 Community Edition