The sort() method arranges list elements in ascending order. Given nums = [3, 1, 4, 1, 5, 9, 2, 6], calling nums.sort() modifies it to [1, 1, 2, 3, 4, 5, 6, 9].
For descending order, use reverse=True: nums.sort(reverse=True) gives [9, 6, 5, 4, 3, 2, 1, 1]. Strings sort alphabetically: words.sort() orders by character codes. The sort() method modifies the list in place and returns None.
For a new sorted list without modifying the original, use the sorted() function: new_list = sorted(nums) leaves nums unchanged. Choose sort() when you don't need the original order; choose sorted() when you do.