Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

python reversed range

# Basic syntax:
range(start, stop, -1) # or:
reversed(range(stop))
# Note, the stop value is not inclusive with range()

# Example usage:
for i in range(5, 0, -1):
    print(i)
# prints:
5
4
3
2
1
 
PREVIOUS NEXT
Tagged: #python #reversed #range
ADD COMMENT
Topic
Name
2+9 =