Python Tips: How to do slicing in Python

preview_player
Показать описание
Do you know that there are multiple ways to do slicing in Python?

Here, Anaconda’s Sophia Yang shows three ways to do slicing:
🤓 ‘L[start:stop:step]’ is the most common
😎 ‘slice(start, stop, step)’ comes up if we define our own ‘__getitem__’

Test it yourself with Anaconda’s cloud notebooks & follow Anaconda for more Python tips!

#shorts #python #pythonprogramming #datascience #pythontutorial
Рекомендации по теме