Python Slice Object

0
5كيلو بايت

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

البحث
الأقسام
إقرأ المزيد
Programming
Python SlowAPI
SlowAPI is a ratelimiter library for FastAPI and Starlette adapted from flask-limiter. This...
بواسطة Jesse Thomas منذ ٢ سنوات 0 5كيلو بايت
Социальные проблемы
Реквием по мечте. Requiem for a Dream. (2000)
Каждый стремится к своей заветной мечте. Сара Голдфарб мечтала сняться в известном телешоу, ее...
بواسطة Nikolai Pokryshkin منذ ٢ سنوات 0 13كيلو بايت
الخرائط
What are the cards by purpose. Meaning and classification of geographical maps
What are the cards by purpose. Meaning and classification of geographical mapsFor the first time,...
بواسطة FWhoop Xelqua منذ ٢ سنوات 0 12كيلو بايت
Horror
The Evolution of the Horror Movie Industry: A Tale of Fear, Innovation, and Endurance
The horror movie industry is one of the most enduring and versatile genres in cinema history....
بواسطة Dacey Rankins منذ شهر 0 2كيلو بايت
Financial Services
What is an APR
About APR Technically speaking, APR (annual percentage rate) is a numeric representation...
بواسطة Mark Lorenzo منذ ٢ سنوات 0 6كيلو بايت
image/svg+xml


BigMoney.VIP Powered by Hosting Pokrov

Top sites Pokrov