First time here? Check out the FAQ!
answered 2017-07-14 17:19:01 +0100
range(0,n-1) goes from 0 to n-2, you should use range(0,n) or range(n).
range(0,n-1)
0
n-2
range(0,n)
range(n)