0

What does it mean when you put more parameters in the the function range? example:range(len(array)-1,-1,-1)

9th Dec 2020, 4:45 PM
Andrei I
Andrei I - avatar
1 ответ
+ 1
len( array ) - 1 points to index of last element in <array>. -1 means the loop ends at 0, range end is exclusive. -1 means decrement loop counter rather than increasing it.
9th Dec 2020, 5:17 PM
Ipang