Python Slice Object
نشر بتاريخ 2023-02-27 22:23:14
0
8كيلو بايت
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
إقرأ المزيد
The Great Dictator. (1940)
Dictator Adenoid Hynkel tries to expand his empire while a poor Jewish barber tries to avoid...
Python Hello World Easter Egg
Python has gotten another easter egg from the module __hello__ or __phello__. When importing that...
ADHD: Behavioural therapies
There is good evidence for the use of behavioural therapies in ADHD. They are the recommended...
FOX 5, Live TV New York USA
New York news, weather, traffic and sports from FOX 5 NY serving New York City, Long Island, New...
Meetings are a total waste of time. Here's how to make them useful
If you've ever sat through a meeting and left wondering, "What was the point of that?", you're...