Advance Functions In Python #03
Advance Functions In Python
Slicing Collection Data Types
Slicing is one of the most important part which in python data types.
This Ability allows us to manage Data collections easily.
Collection [start: end: step ] #this is the basic structure of a slicing technique
This is how we Numbering Collection of Data .
Ex : x = ("apple","banana","berry", 45, 56.2 ,True)
0 1 2 3 4 5
- Extracting a sub collection starting from index start to index end -1 taking increments os step
- The extracted elements will satisfy the following conditions, the indexes will be
- >= start
- < end
- increment step
Lets take a look how they exactly works :
Also We can define End points and Starting points by leaving those values Enpty in [ ]
Maybe if I wanted to select one after one..the way I could do that use inclement.
Comments
Post a Comment