"""
data type - list
"""

# slicing a list
a = [5,10,15,20,25,30,35,40]

print(a[2])     # by index
print()
# a[2] = 15
# print("a[2] = ", a[2])

# 5,10,15
print(a[0:3])
print(a[:3])
print()

# 30,35,40
print(a[5:8])
print(a[5:7])
print(a[5:-1])
print(a[5:])
print()

# slicing for all
print(a[:])
print(a)
print()

# the last item
print(a[-1])
print(a[7])
print()

# print out the item of 20 in two ways
print(a[3])
print(a[-5])
print()

# access one item by slicing
print(a[1:2])




# one items has two index  (1: ltr, 2:rtl)
# stop - start = number of items


