Python Slice Object
Сообщение 2023-02-27 22:23:14
0
12Кб
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
- Personal Development
- Recreation
- Regional
- Reference
- Science
- Shopping
- Society
- Sports
- Бизнес
- Деньги
- Дом
- Досуг
- Здоровье
- Игры
- Искусство
- Источники информации
- Компьютеры
- Личное развитие
- Наука
- Новости и СМИ
- Общество
- Покупки
- Спорт
- Страны и регионы
- World
Больше
Survival Island. (2005)
Three people - a rich couple and a crew member - are shipwrecked on a tropical island and their...
Корпорация монстров. Monsters, Inc. (2001)
Склизкий гад в сливном бачке, мохнатый зверь, похожий на чудовище из «Аленького...
How Do I Add AdSense to My Website?
Adding Google AdSense to your website is one of the most common ways to monetize online content....
What Is Retargeting? A Complete Guide to Re-Engaging Website Visitors and Lost Prospects
Most people who visit a website do not take action the first time.
They browse, compare, get...
Methodology for describing a business idea and working materials for the development of a business idea
Methodology for describing a business idea and working materials for the development of a...