Python Slice Object

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

Zoeken
Categorieën
Read More
Television
ABC 13. KTNV Las Vegas Live TV. USA
KTNV-TV, channel 13, is an ABC-affiliated television station located in Las Vegas, Nevada, United...
By Nikolai Pokryshkin 2022-10-10 10:56:05 0 44K
Programming
Create AI with Python
If you’re just starting out in the artificial intelligence (AI) world, then Python is a...
By Jesse Thomas 2023-05-01 19:27:14 0 6K
Television
His Channel. Live TV. Santa Ana, California, USA
His Channel or The Conservative Christian Network is based in Santa Ana, California. Programming...
By Nikolai Pokryshkin 2022-09-27 08:20:04 0 29K
Volleyball
Volleyball
Volleyball (English volleyball from volley - "blow from the flight" and ball - "ball") is a...
By FWhoop Xelqua 2023-02-24 17:26:22 0 12K
Jewelry
The most expensive jewelry in the world
Beautiful, alluring, mystical, mysterious... precious stones have always had a special power over...
By FWhoop Xelqua 2022-11-09 17:34:25 0 15K
image/svg+xml


BigMoney.VIP Powered by Hosting Pokrov

Top sites Pokrov