Python Slice Object
Сообщение 2023-02-27 22:23:14
0
8Кб
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")
Поиск
Категории
- Arts
- Business
- Computers
- Игры
- Health
- Главная
- Kids and Teens
- Деньги
- News
- Recreation
- Reference
- Regional
- Science
- Shopping
- Society
- Sports
- Бизнес
- Деньги
- Дом
- Досуг
- Здоровье
- Игры
- Искусство
- Источники информации
- Компьютеры
- Наука
- Новости и СМИ
- Общество
- Покупки
- Спорт
- Страны и регионы
- World
Больше
Why Global Supply Chains May Never Be the Same. (2022)
Every day, millions of sailors, truck drivers, longshoremen, warehouse workers and delivery...
Мэри и Макс. Mary and Max. (2009)
История отношений 8-летней девочки Мэри Динкль, которая скучает в пригороде далекого...
How Should Equity Be Divided Among Founders?
Equity distribution is one of the most sensitive and impactful decisions a founding team will...
Amazon has made the world's largest text-to-speech AI model with the "rudiments of intelligence"
Researchers at Amazon have trained the largest text-to-speech model in history, which they say...
The Evolution and Impact of Digital Design
Introduction
In the age of technology, digital design has become an integral part of our daily...