Jun-24-2019, 08:47 PM
Hello,
I have the following python code:
thanks in advance :)
I have the following python code:
d = {'123':'John','123':'Steve','4929':'959','3491':'5','319':'Bob','name': 'john','code':6734, 'dept': 'sales'} for k, v in d.items(): if(k == '123'): print (v)and the results should print out 2: which are Steve and John, however i only see steve printed out... not sure why? any help would be great.
thanks in advance :)