← Back to Dictionaries
Question 267
Print Every Key
Print Every Key
Loop over the dict prices with for key in prices: and print each key on its own line. A plain for loop over a dict visits its keys in the order they were written. Input: none. Output: three lines, the item names in that order.
Expected Output:
apple bread milk
= newline. The output ends with a newline — print one after the last line.
Hints2 available
Sign in to use hintsTopics:
Dictionaries
1
Tab to indent (Esc then Tab to move on) · Ctrl+Enter to run · Ctrl+Space to expand shortcuts (pr, inp, def)
Your Output
Run your code to see the output here...
Test Cases
Run your code to see test case results.