'Why it just gives me nothing?

I wanted to make a list in put in it some variables, but when I start this code it's just closing. I am new in python (and coding at all) so what's wrong with code?


sh = 8
sm = 15
length = 45


sme = sm + length
sme *= 7
num = list(range(sm,sme,length))
ns = 1
n1 = 2 * ns
n2 = 5 * ns
n3 = 8 * ns 
for i in num:
     num.insert(n1, n1 + 5)
     num.insert(n2, n2 + 10)
     num.insert(n3, n3 + 15)
     if ns == 1:
         ns += 2
     elif ns%3 == 0: 
         ns += 3
print(num)


Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source