Why the change from .sort() to sorted()?