1sorted(iterable, key=None, reverse=False)
2
3type(sorted(iterable, key=None, reverse=False)) = list
1nums = [4,8,5,2,1]
2#1 sorted() (Returns sorted list)
3sorted_nums = sorted(nums)
4print(sorted_nums)#[1,2,4,5,8]
5print(nums)#[4,8,5,2,1]
6
7#2 .sort() (Changes original list)
8nums.sort()
9print(nums)#[1,2,4,5,8]