Python Slice Object
نشر بتاريخ 2023-02-27 22:23:14
0
11كيلو بايت
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
إقرأ المزيد
Toy Story. (1995)
A cowboy doll is profoundly threatened and jealous when a new spaceman action figure supplants...
Властелин колец: Возвращение короля. The Lord of the Rings: The Return of the King. (2003)
Повелитель сил тьмы Саурон направляет свою бесчисленную армию под стены Минас-Тирита, крепости...
How Does Intrapreneurship Differ from Entrepreneurship?
In today’s fast-paced and innovation-driven world, both entrepreneurship and...
PLAYTV by Brightcove.
Learn how to navigate all types of communication with PLAYTV by Brightcove. Featuring a curated...
Girl in the Basement. (2021)
Sarah is a teen girl who is looking forward to her 18th birthday to move away from her...