In trying to understand how to work with classes, objects, and methods, Please explain why print(list.sort()) does not work like list.sort() followed by print(list).
list = [5, 1, 2]
print(list.sort())
#output is None
VS.
list.sort()
print(list)
#output is [1, 2, 5]
Explained above: I expected print(list.sort()) to output a sorted list instead of None
As you can read in the documentation of
list.sort(bold text by me)