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

Rechercher
Catégories
Lire la suite
Television
ABC Action News. WFTS Tampa Bay, Florida, USA.
WFTS-TV is an ABC-affiliated television station located in Tampa, Florida, United States. It is...
Par Nikolai Pokryshkin 2022-10-29 12:06:35 0 50KB
Entertaining
The Art of Home Entertaining: Creating Memorable Experiences for Your Guests
Home entertaining is an age-old tradition that allows hosts to share their space, hospitality,...
Par Dacey Rankins 2024-11-28 15:05:52 0 11KB
Социальные проблемы
Фортуна. Fortuna. (2021)
Фортуна (6 лет) живет со своей матерью в безымянном пригороде. Она проводит время с двумя...
Par Nikolai Pokryshkin 2022-09-14 22:50:15 0 26KB
Business
Can Communication Skills Be Learned or Are They Innate?
Introduction Communication is central to human interaction. Every day, people rely on...
Par Dacey Rankins 2025-11-20 15:20:48 0 3KB
Social Issues
The Departed. (2006)
An undercover cop and a mole in the police attempt to identify each other while infiltrating an...
Par Leonard Pokrovski 2022-12-01 20:36:46 0 23KB

BigMoney.VIP Powered by Hosting Pokrov