Python Slice Object
Postado 2023-02-27 22:23:14
0
11KB
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")
Pesquisar
Categorias
- Arts
- Business
- Computers
- Jogos
- Health
- Início
- Kids and Teens
- Money
- News
- Recreation
- Reference
- Regional
- Science
- Shopping
- Society
- Sports
- Бизнес
- Деньги
- Дом
- Досуг
- Здоровье
- Игры
- Искусство
- Источники информации
- Компьютеры
- Наука
- Новости и СМИ
- Общество
- Покупки
- Спорт
- Страны и регионы
- World
Leia mais
20 ways to attract visitors to the site through your personal link!
How to attract visitors to the site through your personal link? This question is asked by almost...
Выжившая. Кровь и металл. Spare Parts. (2020)
После не особо удачного концерта участниц панк-группы похищают неизвестные, ампутируют им руки и...
Why does a start-up business need marketing?
Why does a start-up business need marketing?
It seems that the English-language term...
10 "MarketPlace" platforms through which you can sell your goods in the USA
As you know, the United States is a very developed country, in which most people make purchases...
What Are the Most Common Funding Sources for Startups?
Securing funding is one of the most challenging and essential steps in launching a startup. As a...