Python Slice Object

0
4KB

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
Gifts
Birthday gifts to get for someone you know!
My next birthday was approaching. Based on the experience of past years, I decided to change the...
Por FWhoop Xelqua 2022-09-24 19:18:28 0 22KB
Life Issues
Going Clear: Scientology & the Prison of Belief (2015)
A documentary looking at the inner-workings of the Church of Scientology. my link
Por Leonard Pokrovski 2023-07-22 17:18:01 0 20KB
Animation
Top 10 Greatest Anime
Anime, a wondrous and captivating form of storytelling, has its roots in the land of the rising...
Por FWhoop Xelqua 2023-04-27 17:44:48 0 10KB
Biology
Sea Bunny
Jorunna parva, commonly known as the sea bunny, is a species of dorid nudibranch, a shell-less...
Por FWhoop Xelqua 2023-04-28 18:01:26 0 8KB
Научная фантастика и фэнтези
Апокалипсис. Дорога сквозь тьму. Broken Darkness. (2021)
После того как метеоритный дождь уничтожил практически все живое на Земле, Сэм вынужден выжить...
Por Nikolai Pokryshkin 2022-09-11 22:27:06 0 33KB
image/svg+xml


BigMoney.VIP Powered by Hosting Pokrov