
In this blog we will discuss about how to add the and remove the tuple
Codes were given below…
first make the tuple of your choice…
data = ('Cars' , 'Planets' , 'Homes' , 'Forests') # declaring a tuple
check and print the tuple using print command…
print(data) # print the tuple
add value to the tuple using append…
data.append('admin')
now check the updated tuple using print command
print('Updated Tuple: ',data)
Now see how to remove the value from data by using remove function
data.remove('Cars')
Now print the updated tuple using print command
print(data)
If you like the post
Give us a comment and share post as much as you can for support
Leave a Reply