๐ŸŒ
GeeksforGeeks
geeksforgeeks.org โ€บ python โ€บ string-slicing-in-python
String Slicing in Python - GeeksforGeeks
Explanation: The slice s[::-1] starts from the end and steps backward through the string, which effectively reversing it. This method does not alter the original string. Letโ€™s see how to use string slicing in Python with the examples below:
Published: October 7, 2026
๐ŸŒ
TechVidvan
techvidvan.com โ€บ tutorials โ€บ python-slicing
Slicing in Python with Python Slice Function and Indexing - TechVidvan
April 11, 2020 - The slice function takes in the values of start, stop and step as arguments and returns a slice object. This slice object can then be passed within the square brackets in place of start:stop:step to access the desired slice.
๐ŸŒ
Reddit
reddit.com โ€บ r/python โ€บ a comprehensive guide to slicing in python
r/Python on Reddit: A Comprehensive Guide to Slicing in Python
February 1, 2022 - I'm very new to Python and one thing I find confusing and unintuitive is that some things, like slices, start counting at 0 but other things like groups in regular expressions start counting at 1.
๐ŸŒ
Python
docs.python.org โ€บ 3 โ€บ c-api โ€บ slice.html
Slice Objects โ€” Python 3.15.2 documentation
The type object for slice objects. This is the same as slice in the Python layer.
๐ŸŒ
Python Reference
python-reference.readthedocs.io โ€บ en โ€บ latest โ€บ docs โ€บ brackets โ€บ slicing.html
[] (slicing) โ€” Python Reference (The Right Way) 0.1 documentation
>>> +---+---+---+---+ >>> |-4 |-3 |-2 |-1 | <= negative indexes >>> +---+---+---+---+ >>> | A | B | C | D | <= sequence elements >>> +---+---+---+---+ >>> | 0 | 1 | 2 | 3 | <= positive indexes >>> +---+---+---+---+ >>> |<- 0:3:1 ->| <= extent of the slice: "ABCD"[0:3:1]
๐ŸŒ
Real Python
realpython.com โ€บ ref โ€บ glossary โ€บ slice
slice | Python Glossary โ€“ Real Python
In Python, a slice is an object that allows you to extract a portion of a sequence, such as a list, tuple, or string.
Find elsewhere
๐ŸŒ
YouTube
youtube.com โ€บ fabio musanni - programming channel
Python Slicing String and List | Python Slice Notation Explained - YouTube
๐Ÿ’ป *Get my Source Codes and support the channel* โค๏ธ: https://www.buymeacoffee.com/fabiomusanni/extrasโฌ‡๏ธ *LEARN ON THE BEST LEARNING PLATFORMS (LINKS BELOW)* ...
Published: November 16, 2022
Views: 899
๐ŸŒ
W3Schools
w3schools.com โ€บ python โ€บ gloss_python_string_slice.asp
Python Slice Strings
You can return a range of characters by using the slice syntax. Specify the start index and the end index, separated by a colon, to return a part of the string. Get the characters from position 2 to position 5 (not included): b = "Hello, World!" print(b[2:5]) Try it Yourself ยป ยท Python Strings Tutorial String Literals Assigning a String to a Variable Multiline Strings Strings are Arrays Negative Indexing on a String String Length Check In String Format String Escape Characters
๐ŸŒ
Stack Overflow
stackoverflow.com โ€บ questions โ€บ 509211 โ€บ how-slicing-in-python-works
slice - How slicing in Python works - Stack Overflow
How does Python's slice notation work? That is: when I write code like a[x:y:z], a[:], a[::2] etc., how can I understand which elements end up in the slice? See Why are slice and range upper-bound
๐ŸŒ
DEV Community
dev.to โ€บ thrivensunshine โ€บ slicing-in-python-2hlk
Slicing in Python - DEV Community
April 3, 2020 - One of these similarities include the idea of "slicing" some form of data. Slicing does exactly what it implies, it "slices" up data into smaller parts. Every language has their own particular way of doing this. Lets take a look at how Python in particular handles this kind of operation.
๐ŸŒ
YouTube
youtube.com โ€บ programmingknowledge
Python Tutorial for Beginners 8 - Python Slices or Slicing - YouTube
In this video I am going to show How to use Slice function or slicing with Python Collections. Also I am going to show how to use Negative index with Python ...
Published: September 6, 2014
Views: 215K
๐ŸŒ
University of Pittsburgh
sites.pitt.edu โ€บ ~naraehan โ€บ python3 โ€บ mbb8.html
Python 3 Notes: List Slicing
Python 3 Notes [ HOME | LING 1330/2330 ] Tutorial 8: List Slicing << Previous Tutorial Next Tutorial >> On this page: slice indexing with [:], negative indexing, slice and negative indexing on strings. Video Tutorial Python 3 Changes print(x,y) instead of print x, y Python 2 vs.
๐ŸŒ
YouTube
youtube.com โ€บ watch
Python Tutorial: Slicing Lists and Strings - YouTube
In this video we will look at how to slice lists and strings in Python. Slicing allows us to extract certain elements from these lists and strings. This can ...
Published: October 29, 2015
๐ŸŒ
The Python Coding Stack
thepythoncodingstack.com โ€บ notes from the near future โ€บ a slicing story
A Slicing Story - The Python Coding Stack
September 24, 2023 - You can read more about __getitem__() in The Manor House, the Oak-Panelled Library, the Vending Machine, and Python's `__getitem__()`. In this new class called TestList, which inherits from list, you first print the value and data type of the argument in the __getitem__() method, and then you call the list's __getitem__() method and return its value. This is what super().__getitem__(item) does since list is the superclass for TestList. The syntax 2:7 within the square brackets represents a slice object.
๐ŸŒ
Sentry
sentry.io โ€บ sentry answers โ€บ python โ€บ python slice notation
Python Slice Notation for Strings and Lists | Sentry
September 17, 2026 - Use Python slice notation to extract substrings and sublists with start, stop, and step indices, including negative indexing and reverse iteration
๐ŸŒ
Sentry
sentry.io โ€บ sentry answers โ€บ python โ€บ slicing in python
Python: How Slice Notation Works | Sentry
September 24, 2026 - Pythonโ€™s slice notation provides a quick way for programmers to extract sections of sequences, such as lists and strings.
๐ŸŒ
Python Morsels
pythonmorsels.com โ€บ slicing
Python list slicing (with examples) - Python Morsels
August 3, 2026 - In Python, slicing uses colons in square brackets to grab part of a list, string, or tuple: first items, last items, reverse, and step.
๐ŸŒ
freeCodeCamp
freecodecamp.org โ€บ news โ€บ slicing-and-indexing-in-python
Slicing and Indexing in Python โ€“ Explained with Examples
December 11, 2025 - In Python, you perform slicing using the colon : operator. The syntax for slicing is as follows: ... where start_index is the index of the first element in the sub-sequence and end_index is the index of the last element in the sub-sequence ...
๐ŸŒ
YouTube
youtube.com โ€บ watch
Python Slicing | Python Slicing Strings & Lists | Python Tutorial | Python Programming | Simplilearn - YouTube
"๏ธ๏ธ๐Ÿ”ฅProfessional Certificate in AI and Machine Learning - https://www.simplilearn.com/professional-aiml-program?utm_campaign=1SDUW_-cPFw&utm_medium=Descript...
Published: January 7, 2019