Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

reverse list in python

# Reversing a list using reversed()
def Reverse(lst):
    return [ele for ele in reversed(lst)]
     
# Driver Code
lst = [10, 11, 12, 13, 14, 15]
print(Reverse(lst))
Source by www.geeksforgeeks.org #
 
PREVIOUS NEXT
Tagged: #reverse #list #python
ADD COMMENT
Topic
Name
2+6 =