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
إقرأ المزيد
Explicit and implicit costs and accounting and economic profit
Key points
Privately owned firms are motivated to earn profits. Profit is the...
Six Minutes to Midnight (2020)
UK, Aug. 15, 1939: 17 days before WWII, an English teacher and his camera disappear from a...
Mank (2020)
In 1940, film studio RKO 1940 hires 24-year-old wunderkind Orson Welles under a contract that...
How Long Should a Press Release Stay Online, and How Long After Distribution Is It Relevant?
Introduction: The Lifespan of News in a Digital World
In the past, news was printed on paper,...
Electronic Bulletin Boards
An electronic bulletin board is a website where ads are placed.
Initially, this concept referred...