K Kapnula
👤
📚
课程 13 · 年级 P2

Lists & dicts: real-life data

📖 课程 ──▶ 🎯 测验——选择翻译 ──▶ ✅ 本课已完成
4 × 5 = 20

A list is a box with ordered slots: shopping = ["milk", "bread", "apples"]. A dict is an address book: phone = {"Mum": "+49 151…"} — the name gives the number instantly.

Kapnula itself is lists and dicts: a city's listings = a list of dicts {title, price, photo}. Your quiz from the last project? Also a list!

💡 Task: create friends = {"name": "hobby"} for three friends and print nicely: for name, hobby in friends.items(): print(name, "—", hobby)
🎯
测验一下吧!
用练习巩固主题——就像课后练习
测验——选择翻译 → 🖨 练习纸
← 上一课 下一课 →
⛅ 13° Potsdam 💨 10 km/h
💶 EUR 🇺🇸 1.12 USD 🇷🇺 93.87 RUB 🇵🇱 4.39 PLN 🇺🇦 50.32 UAH EZB · daily
⛽ Fuel E5 2.159€ E10 2.099€ Diesel 2.179€ Berlin · tankerkönig.de