Answers for "function reverse to python"

0

how to reverse a string in python

belief = "the world is mine, hello"[::-1]
print(belief)
Posted by: Guest on October-05-2020
-2

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()
Posted by: Guest on May-27-2020

Code answers related to "function reverse to python"

Python Answers by Framework

Browse Popular Code Answers by Language