Python Slice Object
Posted 2023-02-27 22:23:14
0
11K
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")
Cerca
Categorie
- Arts
- Business
- Computers
- Giochi
- Health
- Home
- Kids and Teens
- Money
- News
- Personal Development
- Recreation
- Regional
- Reference
- Science
- Shopping
- Society
- Sports
- Бизнес
- Деньги
- Дом
- Досуг
- Здоровье
- Игры
- Искусство
- Источники информации
- Компьютеры
- Личное развитие
- Наука
- Новости и СМИ
- Общество
- Покупки
- Спорт
- Страны и регионы
- World
Leggi tutto
Money Fight. (2020)
A group of friends decides to document their lives as they search for an underground fight club...
What is the Difference Between a Resume and a Business Biography?
In the professional world, both resumes and business biographies serve as tools to present an...
Tourists went into outer space for the first time in history. How this industry is developing
On September 12, the first ever tourist spacewalk took place. As part of the private mission...
How Do I Advertise on a Billboard?
Billboard advertising is one of the most visible forms of outdoor advertising, but for many...
Desktop Publishing
Desktop publishing system (NIS) is a set of equipment for preparing the original layout of the...