Stavo provando un semplice pezzo di codice, ho ottenuto il nome e l'età di qualcuno e glielo faccio sapere quando compiono 21 anni ... non considerando i negativi e tutto il resto, solo casuali.Errore: l'oggetto 'int' non è indicativo
Continuo a ricevere questo errore 'int' object is not subscriptable
.
name1 = raw_input("What's your name? ")
age1 = raw_input ("how old are you? ")
x = 0
int([x[age1]])
twentyone = 21 - x
print "Hi, " + name1+ " you will be 21 in: " + twentyone + " years."
Perché si dice che non è subscriptable invece di dire che non è indicizzabile? – nog642