Computer Science

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.

Python List Manipulation

5 Likes

Answer

(i)

L1.insert(2, 200)

(ii)

message.endswith('.')

Answered By

2 Likes


Related Questions