Question: Python Think of five places in the world you'd like to visit. Store the three locations in a list. Make sure the list is not
Python
Think of five places in the world you'd like to visit.
Store the three locations in a list. Make sure the list is not in alphabetical order (1 pt).
Use .append()to add one more location to the end of the list (1 pt).
Print your list in its original order, now this list should contain four locations. (1 pt).
Use sorted() to print your list in alphabetical order without modifying the actual list. (2 pts)
Show that your list is still in its orginal order by simply printing the list again (1 pt)
Use .reverse() to change the order of your list. Print the list to show hat its order has been changed (2 pts).
Use .sort() to change your list so it's stored in alphabetical order. Print the list to show that its order has been changed (2 pts).
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
