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
إقرأ المزيد
Computer Ethics: Navigating the Moral Landscape of Technology
As technology continues to advance at an unprecedented rate, the ethical implications of its...
150+ ideas on what to give your child for their birthday
Puzzles, creativity kits, pajamas and 150 more birthday gift ideas for a child of any age
Even...
Grave of the Fireflies. (1988)
The story of Seita and Setsuko, two young Japanese siblings, living in the declining days of...
Computer Speech Technology
Computer speech technology, often referred to as speech recognition or speech synthesis,...
The Vault (2021)
Follows a genius engineering graduate who is interested in the Bank of Spain's safe.
My Link