Finding ranks with number keys
Predict the output · Basic · §4.1 By name, not by number
This week's follower ranking is stored in a dictionary. The rank numbers are the keys. Predict the output without running the code.
Code
rank = {2: "jun", 3: "sora", 1: "mina"}
print(rank[1])
print(rank[3] + ", " + rank[2])Solve this problem in your browser
Python runs in your browser and checks your answer right away. Hints and the answer are on the problem page.