Actually, I still haven't simplified completely; the middle part of the slice could be omitted entirely. Man I love python. so, the final concise Line 7 would be: siv[2*i::i]=[0]*(n/i-1)
the middle part of the slice in question (on line 7) is the expression n/i*i+1. This is not incorrect, but could be simply n+1. Why divide and then multiply by i? Am I missing something subtle here?
aoeu Actually, I still haven't simplified completely; the middle part of the slice could be omitted entirely. Man I love python. so, the final concise Line 7 would be: siv[2*i::i]=[0]*(n/i-1)
-DtBeloBrown
remy Because of integer division it works a bit differently. For example: 5/2*2+1 = 2*2+1 = 5 and not 6.
so, the final concise Line 7 would be:
siv[2*i::i]=[0]*(n/i-1)
-DtBeloBrown