DrSchool Learn coding, fast.
EN AR BN CS DE EL Search

Sorting — Example 187

Quick explanation + ready code for: Sorting.

Python Sorting Back to examples
Back to language
Syntax: Sorting in Python. ID: #187

Code

a = [3,1,2,4]
a.sort()
print(a)

Notes

You can copy this snippet and adapt it. For advanced, add real-world inputs, edge cases, and tests.