use of list And tuple
# list [ ] l1 =[ 1 , 6 , 3 , 8 , 5 , 9 , 5 ] print ( l1 ) l1 . sort () print ( l1 ) print ( l1 [ 0 : 5 ]) # 0to 5 printed print ( l1 [ 0 : 7 : 2 ]) #alternat 1 place skiped #l1 = l1.replace("1","7") #this is use only for string not for list if you do so first change to string print ( l1 ) l1 . reverse () print ( l1 ) l1 . append ( 5 ) #add a new element at last in this list l1 . insert ( 5 , 100 ) # add an element at 6th place as 100 to existing list #l1.sort() print ( l1 ) l1 . pop ( 3 ) # it remove 3rd index value print ( l1 ) l1 . remove ( 8 ) #it remove element 8 from the list print ( l1 ) ################################ #creating a tuple using()(parenthesis) t =( 2 , 3 , 6 , 9 , 10 ) #printing the tuple print ( t [ 4 ]) # it provide yo the 5th element of t n+1th element #you can't change or update the value of t #t[1]=90 # you will see an error you cant change the value of tuple #t1 =(2) #wrong way to assign a tuple use always a comma #t= (2,) # tupple...