DEV Community

Cover image for Reverse  List Slice   (Python3)
francnstein
francnstein

Posted on

Reverse List Slice (Python3)

squares = [0, 1, 4, 9, 16, 25, 36, 49, 64, 81]
print(squares[::-1])

[81, 64, 49, 36, 25, 16, 9, 4, 1, 0]

Top comments (0)