CBSE · 083Class XII · 2024Section B2 marks

Question 23b

2 April 2024 · Computer Science (083)

A tuple named subject stores the names of different subjects. Write the Python commands to convert the given tuple to a list and thereafter delete the last element of the list.

Answer

python
subject = list(subject)
subject.pop()
# OR
subject = list(subject)
del subject[-1]