CBSE Class 12 Computer Science Question 25 of 42

Solved 2024 Sample Question Paper CBSE Class 12 Computer Science (083) — Question 7

Back to all questions
7
Question

Question 23(a)

Write the Python statement for each of the following tasks using BUILT-IN functions/methods only:

(i) To insert an element 200 at the third position, in the list L1.

(ii) To check whether a string named, message ends with a full stop / period or not.

Answer

(i)

L1.insert(2, 200)

(ii)

message.endswith('.')