Question: use Syder to execute the Python code and answer the questions Code: #lists adict = {'a': 1, 'b': 2, 'c': 3, 4:'d'} print(adict) # Iterating
use Syder to execute the Python code and answer the questions
Code: #lists adict = {'a': 1, 'b': 2, 'c': 3, 4:'d'} print(adict) # Iterating a dictionary for ch in adict: print(ch)
print() for ch in adict: print(adict[ch])
Questions: Why can dictionary keys be strings or integers? What do each of the for loops display?
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
