I'm currently on "More with 'for'" exercise and I'm a little confused on the example given on the left side...
The description below is stating that it places the strings into alphabetical order, but I don't see how it did that? There is nothing specific.
Does the ".sort()" automatically order it alphabetical order or am I overlooking something?
EXAMPLE Replace this line with your code. animals = ["cat", "ant", "bat"] animals.sort() for animal in animals: print animal 1. First, we create a list called animals with three strings. The strings are not in alphabetical order. 2. Then, we sort animals into alphabetical order. Note that .sort() modifies the list rather than returning a new list. 3. Then, for each item in animals, we print that item out as "ant", "bat", "cat" on their own line each.