Computer Science, asked by dakshverma5p4sgsm, 8 months ago

Write proper commands/inbuilt functions for the following based on the lists (3.5)
>>>A= [1,2,3] >>>B= [4,5,6,7,8]
(a) To join the two lists A & B .Result should be [1,2,3,4,5,6,7,8]
(b) To repeat the list A ,3 times O/P should be [1,2,3,1,2,3,1,2,3]
(c ) To add a new element 9 to the list B.
(d) To replace the first element of list A with 100.
(e) To delete the element 3 from list A.
(f) To append list B to list A.
(g) To insert an element 25 between element 5 & 6 in the list B.

Answers

Answered by vanunagar13
15

Answer:

Write proper commands/inbuilt functions for the following based on the lists (3.5)

>>>A= [1,2,3] >>>B= [4,5,6,7,8]

(a) To join the two lists A & B .Result should be [1,2,3,4,5,6,7,8]

(b) To repeat the list A ,3 times O/P should be [1,2,3,1,2,3,1,2,3]

(c ) To add a new element 9 to the list B.

(d) To replace the first element of list A with 100.

(e) To delete the element 3 from list A.

(f) To append list B to list A.

(g) To insert an element 25 between element 5 & 6 in the list B.

Similar questions