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
إقرأ المزيد
Psychosis: Disability
DisabilityThe classification of psychosis as a social disability is a common occurrence....
Is Lean Startup Applicable Only to Tech Companies?
The Lean Startup methodology, popularized by Eric Ries, is often associated with technology...
What Is Corporate Synergy and Why Is It Important?
A Comprehensive 3,000-Word Guide to Understanding, Measuring, and Leveraging Synergies in Mergers...
Examples of guerrilla marketing – promotion through creativity in advertising with a small budget
Many have heard of the term guerrilla marketing, but few have really resorted to it, and it is an...
How do I organize a support group?
In this article, we will talk mainly about the so-called peer support groups, in which...