There are various ways to extract elements, Uni length slicing and Access Notations are among them. Let’s check difference between them.
Difference #1 : Different behaviour with Different Containers
The access notation return element in both List and Strings, but return 1 length strings while slicing using uni length slice and element in case of strings.
The original list : [5, 7, 2, 6, 8, 1] The original string : 572681 The access notation result for list : 6 The access notation result for string : 6 The slicing result for list :  The slicing result for string : 6
Difference #2 : No Index out of bounds Exception in case of Slice operation
There is no out of bounds exception in case of Slice Operation, but there is, in case of access notation.
The original list : [5, 7, 2, 6, 8, 1] The access notation result for list : list index out of range The slicing result for list : 
Attention geek! Strengthen your foundations with the Python Programming Foundation Course and learn the basics.
To begin with, your interview preparations Enhance your Data Structures concepts with the Python DS Course.
- Basic Slicing and Advanced Indexing in NumPy Python
- Python List Comprehension and Slicing
- Python Slicing | Reverse an array in groups of given size
- Program to cyclically rotate an array by one in Python | List Slicing
- Python Slicing | Extract ‘k’ bits from a given position
- Python | Slicing list from Kth element to last element
- Python | Variable list slicing
- Python | Alternate range slicing in list
- Python | Get the substring from given string using list slicing
- Python | Reverse Slicing of given string
- Python | Custom slicing in List
- Python | K elements Slicing
- String Slicing in Python
- Python | Custom List slicing Sum
- Python | Reverse Interval Slicing String
- Python | Reverse Incremental String Slicing
- Slicing range() function in Python
- Python - Convert 2D list to 3D at K slicing
- Python List Slicing
- Interesting facts about strings in Python | Set 2 (Slicing)
If you like GeeksforGeeks and would like to contribute, you can also write an article using contribute.geeksforgeeks.org or mail your article to firstname.lastname@example.org. See your article appearing on the GeeksforGeeks main page and help other Geeks.
Please Improve this article if you find anything incorrect by clicking on the "Improve Article" button below.