tuple python
tuple = ("Facebook", "Instagram", "TikTok", "Twitter")
moi_crn
tuple = ("Facebook", "Instagram", "TikTok", "Twitter")
a=(1,2,3,4)
print(a[-3])
strs = ['ccc', 'aaaa', 'd', 'bb'] print sorted(strs, key=len) ## ['d', 'bb', 'ccc', 'aaaa']
#the list will be sorted by the length of each argument
name_of_students = ("Jim" , "yeasin" , "Arafat")
print(name_of_students.index('Arafat'))
tupel python
# Membership test in tuple
my_tuple = ('a', 'p', 'p', 'l', 'e',)
# In operation
print('a' in my_tuple)
print('b' in my_tuple)
# Not in operation
print('g' not in my_tuple)