Question: Using Python Start by assigning to variables monthsL and monthsT a list and a tuple, respectively, both containing strings 'Jan', 'Feb', 'Mar', and 'May', in

Using Python

Start by assigning to variables monthsL and monthsT a list and a tuple, respectively, both containing strings 'Jan', 'Feb', 'Mar', and 'May', in that order.

Then attempt the following with both containers:

(a) Insert string 'Apr' between 'Mar' and 'May'.

(b) Append string 'Jun'.

(c) Pop the container.

(d) Remove the second item in the container.

(e) Reverse the order of items in the container.

(f) Sort the container.

Note: when attempting these on tuple monthsT you should expect errors.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!