python - TypeError: unorderable types: str() > int() with list -
this question has answer here:
- “unorderable types: int() < str()” 3 answers
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
Post a Comment