Numbers counted from 1, and indexes
Predict the output · Medium · §10.4 Index and value together
The accounts are listed in order of followers, from most to fewest, and the code gives them ranks starting from first place. Predict the output without running the code.
Code
names = ["sora", "mina", "jun"]
ranked = list(enumerate(names, start=1))
print(ranked)
print(ranked[1])
print(names[1])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.