Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

reverse python3

arr = [2,5,32,86,4,131,97]

# reverse without modifying input, using range:
for i in range(len(arr)-1, -1, -1):
    print(arr[i])
    
# reverse and modifying input:
arr.reverse()

 
PREVIOUS NEXT
Tagged: #reverse
ADD COMMENT
Topic
Name
3+6 =