Hello,
very simple python example, trying to re-learn python, hopefully it goes well
i have a simple dictionary:
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)
looking above, just want to print 2 rows, which have the specific key 123, so it should print John and Steve, however it only prints steve? why and how can i accomplish this?
thanks in advance