When using sort() on a list of strings like names, the elements get sorted in alphabetical order.
sort()
names
Make sure to pick names followed by . and then sort, (, ).
.
sort
(
)