#!/usr/bin/env python
# coding: utf-8

# <h3 align="center">String Slicing</h3>

# In[3]:


name = "0123456789"

# we can do the exact same thing on list and tuple
# name = (0,1,2,3,4,5,6,7,8,9)
# name = [0,1,2,3,4,5,6,7,8,9]

# [start:stop:stepover]
print(name[1])
print(name[-0])
print(name[-1])
print(name[2:])
print(name[:5])
print(name[1:])
print(name[:])
print(name[::1])
print(name[::-1])
print(name[::2])
print(name[::-2])

python = 'I am PYTHON'

print(python[1:4])
print(python[1:])
print(python[:])
print(python[1:100])
print(python[-1])
print(python[-4])
print(python[:-3])
print(python[-3:])
print(python[::-1])


# In[ ]:




