Write a Python program to sort a list of numbers in both ascending and descending order, printing each on a new line.
Space-separated integers.
Line 1: Ascending sorted list. Line 2: Descending sorted list.
1 <= len(arr) <= 50
5 2 8 1 9
1 2 5 8 9 9 8 5 2 1
Sort elements ascending and descending.
def sort_list(arr):
# Write your code here
pass
arr = list(map(int, input().split()))
s1, s2 = sort_list(arr)
print(*s1)
print(*s2)Embedded systems rely on efficient low-level programming to interact directly with hardware. In this course, you will learn how to write practical Embedded C programs used in real microcontroller-based systems. Rather than focusing only on theory, this course follows a practice-driven approach. Each lesson includes hands-on coding exercises that simulate real firmware development tasks used