Alter the first list – Due to unforeseen circumstances, two of your invitees fell ill and
won’t make it. It means you have to send a new invite to replace the absentees. Using
a print call, list the invitees that won’t make it. Furthermore, replace the list with new
invitees and print out the full list.
Special list – Now create a new list by using the insert() method to add your best five
invitees to the love feast.
Organizing a List in Python
Most times, you may create your list in an unorderly manner because you link the ability to control
what the user is providing. However, you can avoid such a situation and organize the list properly.
You can preserve the order in the list or change it from its original order. There are ways of doing
this, depending on your particular situation.
Do'stlaringiz bilan baham: |