Python Slice Object
Postado 2023-02-27 22:23:14
0
4KB
A slice object is used to specify how to slice a sequence. You can specify where to start the slicing, and where to end. You can also specify the step, which allows you to e.g. slice only every other item. Here's an example of the usage:
x = ("hi", "hello", "greetings", "hola")
y = slice(3)
print(x[y])
>> ("hi", "hello", "greetings")
Pesquisar
Categorias
- Arts
- Business
- Computers
- Jogos
- Health
- Início
- Kids and Teens
- Money
- News
- Recreation
- Reference
- Regional
- Science
- Shopping
- Society
- Sports
- Бизнес
- Деньги
- Дом
- Досуг
- Здоровье
- Игры
- Искусство
- Источники информации
- Компьютеры
- Наука
- Новости и СМИ
- Общество
- Покупки
- Спорт
- Страны и регионы
- World
Leia mais
Birthday gifts to get for someone you know!
My next birthday was approaching. Based on the experience of past years, I decided to change the...
Going Clear: Scientology & the Prison of Belief (2015)
A documentary looking at the inner-workings of the Church of Scientology.
my link
Top 10 Greatest Anime
Anime, a wondrous and captivating form of storytelling, has its roots in the land of the rising...
Sea Bunny
Jorunna parva, commonly known as the sea bunny, is a species of dorid nudibranch, a shell-less...
Апокалипсис. Дорога сквозь тьму. Broken Darkness. (2021)
После того как метеоритный дождь уничтожил практически все живое на Земле, Сэм вынужден выжить...