Python Slice Object

0
4K

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
Leia Mais
Life Issues
Monsters, Inc. (2001)
In order to power the city, monsters have to scare children so that they scream. However, the...
Por Leonard Pokrovski 2023-04-09 18:48:30 0 16K
Социальные проблемы
История Игрушек. Большой побег. Toy Story 3. (2010)
Энди почти 18 лет, ему остаётся 3 дня до отправки в колледж, в то время как его игрушки, в том...
Por Nikolai Pokryshkin 2023-01-08 18:24:06 0 15K
Outro
Last Christmas. (2019)
Kate is a young woman subscribed to bad decisions. Working as an elf in a year round Christmas...
Por Leonard Pokrovski 2022-09-10 18:34:25 0 20K
Телевидение
Инфо 24 - ТВ прямой эфир.
Телеканал «ИНФО 24» начал свое вещание в 2011 году.В 2022 году получил статус...
Por Nikolai Pokryshkin 2022-11-03 19:53:04 0 16K
Design
10 Tips on How to Make Money as a Designer
You might think that the matter is in the lack of higher education, but today it is not necessary...
Por FWhoop Xelqua 2022-10-15 14:08:28 0 25K
image/svg+xml


BigMoney.VIP Powered by Hosting Pokrov