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

xslt - Substring before throwing error -

Google Cloud Bigtable Durability/Availability Guarantees -

Android M doze mode and "native" posix socket freezing up -