I am trying to pass a dict variable into a function in Python 3 and then trying to iterate through the keys by calling the .keys() function. However I don't know how to specify the type of the parameter.
def DisplayStock(StockDict):
for key in StockDict.keys():
The error I am getting is
for key in StockDict.keys():
AttributeError: 'function' object has no attribute 'keys'