1. Unpack a record
Write code Easy ✓ CompletedWrite three statements, each using unpacking:
- Unpack the list
recordinto the namesname,cityandage. - Unpack
date.split("-")intoyear,monthandday. lowandhighwere typed the wrong way round. Swap them with one statement, so thatlowis 3 andhighis 9.
Finally print name and year.
record = ["Asha", "Pune", 28]
date = "2025-03-14"
low, high = 9, 3
# your code here
record = ["Asha", "Pune", 28]
date = "2025-03-14"
low, high = 9, 3
name, city, age = record
year, month, day = date.split("-")
low, high = high, low
print(name, year)