list1=["apple","banana","grapes"]
list1.append("strawberry") # strawberry is added to the list
print(list1)
list1.pop() # removes the last element from the list
print(list1)
list1.pop()
print(list1)
tuple1=("good",1,2,3,"morning")
print(tuple1)
print(tuple1[0]) # accessing values using indexing
#tuple1[1]="change" # a value cannot be changed as they are immutable
tuple2=("orange","grapes")
print(tuple1+tuple2) # tuples can be concatenated
tuple3=(1,2,3)
print(type(tuple3))
tuple1=(1,2,3,4)
# tuple1.pop() tuple cannot be modified
# tuple1.append() tuple cannot be modified
print(tuple1)
set1={1,2,3,4,5}
print(set1)
# set1[0] sets are unordered, so it doesnot support indexing
set2={3,7,1,6,1} # sets doesnot allow duplicate values
print(set2)
set1={"water","air","food"}
set1.add("shelter") # adds an element to the set at random position
print(set1)
set1.add("clothes")
print(set1)
set1.pop() # removes random element from the set
print(set1)
dict1={"key1":1,"key2":"value2",3:"value3"}
print(dict1.keys()) # all the keys are printed
dict1.values() # all the values are printed
dict1["key1"]="replace_one" # value assigned to key1 is replaced
print(dict1)
print(dict1["key2"])
dict1={"fruit1":"apple","fruit2":"banana","veg1":"tomato"}
dict1.update({"veg2":"brinjal"})
print(dict1)
dict1.update({"veg3":"chilli"}) # updates the dictionary at the end
print(dict1)
dict1.pop("veg2")
print(dict1)