Introduction
In this blog, I will explain about the Sliced Sequence in Python. I will show the output in the Run module.
Software Requirement
Python3.5.2.
Simple Programming
- print("Welcome To C#Corner........:")
- print('Slicing Sequences :')
-
- tuples=("The","Python","Blog","By","SR","Karthiga","In","C#Corner")
- sliced_tuple=tuples[4:6]
- print("Tuple Values :")
- print(sliced_tuple)
-
- lists=["The","Python","Blog","By","SR","Karthiga","In","C#corner"]
- sliced_list=lists[6:8]
- print("List values :")
- print(sliced_list)
-
- strings="SR Karthiga In C#corner"
- sliced_string=strings[0:20]
- print("string values :")
- print(sliced_string)
Explanation
I will clearly explain the Slicing Sequence in Python. This shows the tuple value, list value, and string value. It will show in the Run Window.