python - TypeError: unorderable types: str() > int() with list -


this question has answer here:

this code error:

linb = []   cpt = 20    temp = 0     while cpt != 0:        linb.append(input("plus que " + str(cpt) + " nombre rentrer: "))        cpt -= 1    in linb:        if > temp:            temp =    print(temp)    print(linb.index(temp))   ' 

this issu "for in linb:" can't convert i.. linb list number , temp unique number.

thanks !!!

input returns string (str) must convert integer (int):

linb.append(int(input("plus que " + str(cpt) + " nombre rentrer: "))) 

Comments

Popular posts from this blog

sql server - Cannot query correctly (MSSQL - PHP - JSON) -

php - trouble displaying mysqli database results in correct order -

C++ Linked List -