1.

Consider the following listList1=[2,3,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19]Write commands for the following: i. Add 20 at lastii. Insert 4 at third positioniii. Sort the elements of the listiv. Count how many times 6 is availablev. Delete all elements from 3rd to 9th positionvi. Delete 11 from the listvii. Search the position of 13 in the listviii. Find the maximum value of the list ix. Find the length of the list x. Delete all the elements of the list​

Answer»
  1. LIST1.append(20)
  2. list1.insert(3,4)
  3. list1.sort()
  4. list = list1.count(6)
  5. DEL list1[3:9]
  6. list1.remove(11)
  7. list = list1.index(13)
  8. list = max(list1)
  9. list = LEN(list1)
  10. list1.clear()



Discussion

No Comment Found