Sitemap
Habeeb Abdulrauf

Habeeb Abdulrauf

Python l Data Analytics l Web Solution l Curious Learner l Digital Marketing Consultant l SEO Expert l SDGs. My website : https://habeebabdulrauf.com

Slicing in Python

1 min readNov 30, 2022

Yeah, our thread says #pythondatatypes, but what we are looking at today is not datatype but one of the python features that is often used to perform operations on datatypes. Hence, making sense of it. That is SLICING

Slicing in Python is a feature that enables accessing parts of sequences like strings, tuples, and lists.

You can also use them to modify or delete the items of mutable sequences such as lists or dictionaries.

Slices can also be applied to third-party objects like NumPy arrays, Pandas series, and data frames.

Get Habeeb Abdulrauf’s stories in your inbox

Join Medium for free to get updates from this writer.

Slice syntax are: slice(start, stop, step)

Slice() can take three parameters thus :

Start (optional) — Starting integer where the slicing of the object starts. Default to None if not provided.

Stop — Integer until which the slicing takes place. The slicing stops at index stop -1 (last element).

Step (optional) — Integer value which determines the increment between each index for slicing. Defaults to None if not provided.

#dataanalytics #python #pythondeveloper #pythonlearning #pythonchallenge #pythoncode #datavisualization #dataanalysis

--

--

Habeeb Abdulrauf
Habeeb Abdulrauf

Written by Habeeb Abdulrauf

Python l Data Analytics l Web Solution l Curious Learner l Digital Marketing Consultant l SEO Expert l SDGs. My website : https://habeebabdulrauf.com