Informatics Practices
What will be the output of the following statement?
list1 = [12, 32, 65, 26, 80, 10]
list1.sort()
print(list1)
Related Questions
Suppose L = [10, ["few", "facts", "fun"], 3, 'Good']
Consider the above list and answer the following:
(a) L[3:]
(b) L[::2]
(c) L[1:2]
(d) L[1] [1]
Find the output of the following:
L1=[1, 2, 3] L2=[4, 5, 6] print(L1+list ("45") ) print(L1.pop()) L1.remove (2) print(L1) L1.extend (L2) print(L2)What will be the output of the following statement?
list1 = [12, 32, 65, 26, 80, 10] sorted(list1) print(list1)What will be the output of the following statement?
list1 = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10] list1[::-2] list1[:3] + list1[3:]