Python Slice Object

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")

Suche
Kategorien
Mehr lesen
Horror
Twilight. (2008)
When Bella Swan moves to a small town in the Pacific Northwest, she falls in love with Edward...
Von Leonard Pokrovski 2023-04-28 19:40:18 0 26KB
Personal Finance
How Spousal Benefits Work: A Practical Guide
How Spousal Benefits Work: A Practical Guide Social Security can feel complicated, but spousal...
Von Leonard Pokrovski 2025-12-10 22:46:23 0 2KB
Социальные проблемы
Никогда, редко, иногда, всегда. Never Rarely Sometimes Always. (2020)
Легко ли быть девушкой в современном мире? Кто придет на помощь, если ты попадешь в беду? Как...
Von Nikolai Pokryshkin 2022-10-20 12:48:20 0 32KB
Television
Cornerstone Television Network. Live TV. Wall, Pennsylvania, USA.
Cornerstone Television began over 40 years ago – in a vision God gave Norma Bixler during a...
Von Nikolai Pokryshkin 2022-09-30 09:34:39 0 44KB
Travel
Top 5 Zoos
Top 5 best zoos in the worldNot only a child, but also an adult can be delighted with spending...
Von FWhoop Xelqua 2023-05-06 17:56:31 0 26KB

BigMoney.VIP Powered by Hosting Pokrov