11. What is the purpose of the clear() method for lists and tuples?
12. In Python, how can you find the index of a specific element in a list or tuple?
13. Which method is used to sort the elements of a list or tuple in ascending order?
14. In Python, how can you extend a list or tuple by adding elements from another iterable?
15. Which method is used to remove the first occurrence of a specific element in a list or tuple?
16. In Python, how can you join two or more lists or tuples together?
17. In Python, how can you remove all occurrences of a specific element from a list or tuple?
18. What is the purpose of the reverse() method for lists and tuples?
19. What is the output of the following code:
my_list = [1, 2, 3, 4, 5]
print(my_list[1:4])
my_list = [1, 2, 3, 4, 5]
print(my_list[1:4])
20. What is the output of the following code:
my_list = [1, 2, 3]
my_list.append(4)
print(my_list)
my_list = [1, 2, 3]
my_list.append(4)
print(my_list)