Python Slice Object
Сообщение 2023-02-27 22:23:14
0
12Кб
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
- Personal Development
- Recreation
- Regional
- Reference
- Science
- Shopping
- Society
- Sports
- Бизнес
- Деньги
- Дом
- Досуг
- Здоровье
- Игры
- Искусство
- Источники информации
- Компьютеры
- Личное развитие
- Наука
- Новости и СМИ
- Общество
- Покупки
- Спорт
- Страны и регионы
- World
Больше
How do I avoid burnout?
How Do I Avoid Burnout?
Burnout is not simply feeling tired after a long week. It is a sustained...
Going Clear: Scientology & the Prison of Belief (2015)
A documentary looking at the inner-workings of the Church of Scientology.
my link
What Kind of Resources Are Needed to Complete a Transaction?
Mergers and acquisitions (M&A) are among the most resource-intensive and strategically...
JavaScript forEach()
The forEach() method is an iterative method. It calls a...
What’s the Difference Between a Metric and a KPI?
In business performance management, two terms often come up interchangeably: metrics and Key...