Unpack a Book Record
Python
15 pts
Unpack a Book Record
A library stores each book as a tuple: book = ("Python Basics", "Merhawi", 2026).
- Unpack
bookinto three variables:title,authorandyear— in one line. - Print
title, the word"by"andauthorwith oneprint()(use commas). - Print
year.
Expected output:
Python Basics by Merhawi 2026
Checklist
- Keep
bookunchanged and unpack it intotitle,authorandyearin one line. - Print the title, the word
byand the author on one line, then print the year.
🔑 Solution
If you view the solution before passing, you earn half points for this exercise. You still need to type it and press Check to finish.
How it works, step by step
Point at a step to highlight its lines. Type the solution yourself and press Check answer to finish.
