filmov
tv
Python[::-1] How To Reverse A List Or String With The Slice Operator

Показать описание
What does [::-1] do in Python?
The slice operator [::-1] iterates through a string or list by stepping through the characters in a string or elements in a list from the end to the start.
It reverses the iteration through a string or list.
The slice operator [::-1] iterates through a string or list by stepping through the characters in a string or elements in a list from the end to the start.
It reverses the iteration through a string or list.