This post will provide a brief review of Python dictionaries. For this review, both the keys and the items are numerical.
Below is a dictionary with the name, "upstream_res_rel".
upstream_res_rel = {75:500, 77:1500, 80:2000, 120:2500}
To print the keys in a sequential manner, I use the following command:
Below is the result:
To get a specific item in the dictionary, I use the following command:
Below is the result:
Below is a dictionary with the name, "upstream_res_rel".
upstream_res_rel = {75:500, 77:1500, 80:2000, 120:2500}
To print the keys in a sequential manner, I use the following command:
Below is the result:
To get a specific item in the dictionary, I use the following command:
Below is the result:
Comments
Post a Comment