Question: So far we have seen how new lists can be built out of old lists using the addition and multiplication operators. This question will work
So far we have seen how new lists can be built out of old lists using the addition and multiplication operators. This question will work with some other functions to do that.
First copy or cut-and-paste this data (which is admittedly incomplete)
months = ['Feb','Mar','Apr','May','Jun','Jul','Aug','Oct','Nov']
Then observe the effects of these statements.
months.append('Dec') months.insert(0,'Jan') months And finally, for the question, identify how the insert function could be used to correctly place 'Sep' between 'Aug' and 'Oct'.
If you happen to put it in the wrong place, you can undo the insertion with
months.remove('Sep')
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
