TechToFreedom
Published in

TechToFreedom

5 Python Slicing Tricks That Will Make Your Code More Elegant

Small tricks for a big difference

In the Python world, there are many small tricks that can make a big difference to our code. Especially for a large program, these tricks can keep everything neat and elegant.

The slice operator is one of them. It helps us get items from iterables easily and elegantly. For…

--

--

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
Yang Zhou

Yang Zhou

Senior Full-Stack Engineer | Top Writer | Join me in Medium: https://yangzhou1993.medium.com/membership