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)

Heroku

Build apps, not infrastructure.

Dealing with servers, hardware, and infrastructure can take up your valuable time. Discover the benefits of Heroku, the PaaS of choice for developers since 2007.

Visit Site

👋 Kindness is contagious

Please leave a ❤️ or a friendly comment on this post if you found it helpful!

Okay