I'm trying to return a range of Pokemon by their number using a CSV file, using a minimum and a maximum, so I want to change the numbers to an integer. So far, I have only been able to return one exact Pokemon if I don't take the inputs as an integer. My CSV is 801 lines long, poke[0] is their number, and poke[1] is their name.
def number(list):
newlist = []
x = 0
q2 = int(input("Minimum number? "))
q3 = int(input("Maximum number? "))
for poke in range(1,800):
poke[0] = int(poke[0])
for poke in list:
if poke[0] >= q2 and poke[0] <= q3:
newlist.append(poke[0] + " " + poke[1])
for poke in newlist:
print(newlist[x])
x = x + 1