CodePudding user response:
Sort the return value is None,If you use sorted the return value is the sorted list,
CodePudding user response:
A=,4,2 [1]A.s ort ()
Print (a)
B=[31] 1
B=sorted (b)
Print (b)
Output:
[1, 2, 4]
[1, 2, 3]
CodePudding user response:
There is no return value x.s ortIt is ok to use directly