+ 1
What does this error mean?
3 ответов
+ 2
There is not guarantee that all the digits will be in the random number. Therefore, if you try to find something that is not there (which you do), str.index will throw a ValueError
+ 1
How do I fix that?
+ 1
you should check that, for each digit in the guess, it is first in the chosen number and then it is a the right position.
either that or the other way around