python how to get keys AND values code example Example: print key of dictionary python for key, value in mydic.items() : print (key, value)