Write a Python program to sort a dictionary by its values in ascending order and print the resulting sorted dictionary items as a list of tuples.
Space-separated key-value pairs with integer values.
Print the sorted list of tuples.
Non-empty dictionary
banana 3 apple 1 cherry 2
[('apple', 1), ('cherry', 2), ('banana', 3)]
Use `sorted()` with `key=lambda x: x[1]` on `d.items()`.
def sort_by_value(d):
# Write your code here
pass
raw = input().split()
d = {raw[i]: int(raw[i+1]) for i in range(0, len(raw), 2)}
print(sort_by_value(d))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