The code is this and the output is two but I can't figure out why that is the output.
def dictTest(d, aVal):
for k in d:
if d[k] == aVal:
return k
return None
lengths = {'one':3, 0:1, 'two':3}
print(dictTest(lengths, 3))