Skip to content

Commit 42cc9ce

Browse files
Create sort Array.py
1 parent d4e3c4c commit 42cc9ce

1 file changed

Lines changed: 6 additions & 0 deletions

File tree

sort Array.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
# Define a list of integers with multiple zeros and other numbers
2+
new = [0, 1, 0, 2, 4, 0, 0, 6, 0, 2, 3, 4, 5, 0, 1, 6, 0, 50]
3+
4+
# Print the sorted version of the list in ascending order
5+
# This does not modify the original 'new' list, it returns a new sorted list
6+
print(sorted(new))

0 commit comments

Comments
 (0)