When I try printing again, I don't get it in the regular order. How do I revert from reverse alphabetical to stock?
E.g:
E.g:
sorted(countries, reverse=True) ['USA', 'Russia', 'Poland', 'Germany', 'China']now... I get the reverse alphabetical order... Now, how do I get out of this variable and print the stock list again?
sorted(countries, reverse=True) print (countries) print ("\nHere is the original list:") ### I want the original here ###
locations = ['himalaya', 'andes', 'tierra del fuego', 'labrador', 'guam'] print("Original order:") print(locations) print("\nAlphabetical:") print(sorted(locations)) print("\nOriginal order:") print(locations) print("\nReverse alphabetical:") print(sorted(locations, reverse=True)) print("\nOriginal order:") print(locations) print("\nReversed:") locations.reverse() print(locations) print("\nOriginal order:") locations.reverse() print(locations) print("\nAlphabetical") locations.sort() print(locations) print("\nReverse alphabetical") locations.sort(reverse=True) print(locations)found out my book had a support site...