Python Slice Object
Posted 2023-02-27 22:23:14
0
7K
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")
Căutare
Categorii
- Arts
- Business
- Computers
- Jocuri
- Health
- Home
- Kids and Teens
- Money
- News
- Recreation
- Reference
- Regional
- Science
- Shopping
- Society
- Sports
- Бизнес
- Деньги
- Дом
- Досуг
- Здоровье
- Игры
- Искусство
- Источники информации
- Компьютеры
- Наука
- Новости и СМИ
- Общество
- Покупки
- Спорт
- Страны и регионы
- World
Citeste mai mult
WHO TV live stream. Des Moines, Iowa, USA.
WHO-HD Channel 13, is a NBC affiliate TV channel based in Des Moines, Iowa. The channel started...
Не возненавидь. Thou Shalt Not Hate. (2020)
Симоне, хирург еврейского происхождения, становится свидетелем автомобильной аварии. По иронии...
What Are the Biggest Challenges Entrepreneurs Face?
Entrepreneurship is an exciting and rewarding journey, but it also comes with its fair share of...
Should I Include Personal Information in My Business Biography?
In the professional world, a business biography plays a critical role in presenting who you are...
The Truman Show. (1998)
An insurance salesman discovers his whole life is actually a reality TV show.
My Link