Python Slice Object
نشر بتاريخ 2023-02-27 22:23:14
0
6كيلو بايت
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
إقرأ المزيد
Монти Пайтон и священный Грааль. Monty Python and the Holy Grail. (1975)
Король Артур и рыцари Круглого стола отправляются в невероятное путешествие на поиски Святого...
Do I Need Special Licenses or Permits?
When starting a new business, one of the most important questions to ask is whether special...
Огни большого города. City Lights. (1931)
Маленький Бродяга встречает красивую слепую девушку, торгующую цветами на улице, которая по...
Employment: Trends, Challenges, and the Future
The Importance of Employment
Employment plays a crucial role in society, serving as a foundation...
Reproductive Health: Understanding Its Importance for Individuals and Society
Reproductive health is a cornerstone of overall well-being, encompassing a wide range of...