I keep getting the error message 'TypeError: 'int' object is not subscriptable' in python -


i have tested code several times , keep getting same error message.

typeerror: 'int' object not subscriptable 

here code has problem:

guess = int(guess) number = int(number) if guess[0] == number[0]:     ## other (correct)code goes here 

int base type- not list or array, cannot int[0]

string work, hard figure out if thats want based on tiny snippet

guess = str(guess) number = str(number) if guess[0] == number[0]: 

Comments

Popular posts from this blog

javascript - oscilloscope of speaker input stops rendering after a few seconds -

javascript - gulp-nodemon - nodejs restart after file change - Error: listen EADDRINUSE events.js:85 -

Fatal Python error: Py_Initialize: unable to load the file system codec. ImportError: No module named 'encodings' -