Python challenge problem

Python challenge problem

aim:Write a program which will find all such numbers which are divisible by 7 but are not a multiple of 5,
between 2000 and 3200 (both included).

for i in range(2000,3201):
    if i%7==0:
        for j in range(0,641):
            if j*5==i :
                for k in range(0,5000):
for j in range(0,len(num)):

i get some IndexError: list assignment index out of range at line 8
pls help me out…

You only need a single for loop here to accomplish this task.

I guess these much is enough for this

for i in range(2000,3201):#for loop to iterated

#check the condition that is divided by 7 makes it’s remainder as Zero like num%7 gives zero if the remainder is zero and for not divisible by 5 the condition is same but gives remainder so to check that num%5!==0 which is the condition where remainder is not zero

if i%7==0 and i%5!=0:

#print the number that is i here simply by using print function