To access values in a tuple , we use square brackets for slicing along with the index or indices to obtain value available at that index.
Try below code.
destination = ["kenya",'Las-Vegas','Colombia','London','Moscow','Paris']
ranks = (1,2,3,4,5,6,7,8,9,10)
print('destination[1]:',destination[1])
print('ranks[5]:',ranks[5])
apps = ['tiktok','instragram','x','whatsapp','linkedin']
print('apps located at [2]',apps[2])
*output *
When the above code is executed, it produces the following result.
destination[1]: Las-Vegas
ranks[5]: 6
apps located at [2] x
Top comments (0)