Practice question from Python Fundamentals

Fill in the blanks for this dictionary:

student = {
    ____: "Alice",
    "age": ____
}

Answer

[""name"","20"]

Explanation

Dictionary syntax requires keys (usually strings) followed by colons and values. The first blank needs the key "name" (in quotes), and the second blank needs a value like 20 (a number, no quotes).

More questions from Python Programming