#create an empty tuple
a =()
print(a)
#create an empty tuple with tuple() function built in python
tuplea = tuple()
print(tuplea)
#crete a tuple with different data type
tuplex = (“apple”, True, 1.4, 4)
print(tuplex)
#tuple with number
tuplex = 1, 4 , 3 , 7 , 22
print(tuplex)
#unpack tuple in several variable
tuplex = 1,2 , 4
print(tuplex)
a1,b2,c3 = tuplex
print(a1+b2+c3)#the number of variable should be equal to number of items
#adding an item in tuple
tuplex = (1,3,4,5,6,2,4,6)
print(tuple)
tuplex = tuplex +(8,)
print(tuplex)
#adding items in speific index
tuplex = tuplex[:3]+(34,55,76)+tuplex[:3]
print(tuplex)
#converting tuple t string
tuplex = (‘a’,’p’,’p’,’l’,’e’)
str = ”.join(tuplex)
print(str)
#get any item of tuple
tuplex = (‘l’,’a’,’h’,’a’,’r’,’i’)