Show that sort() returns None
A medium Python interview practice problem on DataDriven. Write and execute real python code with instant grading.
- Domain
- Python
- Difficulty
- medium
Problem
Show that sort() returns None. Given nums = [3, 1, 2], assign the result of nums.sort() to a variable called result. Print result and then print nums.
Practice This Problem
Solve this Python problem with real code execution. DataDriven runs your Python code in a real environment and grades it automatically.