[Solved] What is the use of -1 in Python for loop [duplicate]
It will decrement the value by 1 for each iteration This value is called as step which tells the for loop to how to get the next value for the iteration. It can be both negative and positive, but not zero. the positive step means it will increase the iteration value from the first argument … Read more