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
Больше
Zeitgeist (2007)
Mythology and belief in society today, presenting uncommon perspectives of common cultural...
Fox 8 Live TV. Cleveland, Texas, United States.
Fox 8 Cleveland (WJW), is a Fox-affiliated television station located in Cleveland, Texas, United...
Understanding Adult Nutrition: Fueling Your Body for Health and Wellness
As we navigate through adulthood, our nutritional needs change. Maintaining a balanced diet is...
2 Calming Rain Sounds for Deep Relaxation, Sleep, and Stress Relief
Immerse Yourself in Nature’s Serenity: Calming Rain Sounds for Deep Relaxation,...
Flower business at home
Flower business at home
Opening a flower business at home can be a great idea...