Military Officer | Data science | Text mining | Python🐍Machine learning 🚀
Msc International Relations @univofmacedonia | Msc Communication @Auth_University
@The_HappyPath nums -> [1, 2, 3], but result saves the retured value None
nums.sort() signifies the assignment of the value returned by the method, not the list that was modified by the method.
To receive a new list that has been sorted, this is the correct procedure:
result = sorted(nums)