Comparing dictionary to itself? python -
Then I have an initial dictionary like this:
color = { 'Blue': 1, 'red': [], 'green': []}
And after I run my code, I end up with it:
< Pre> color = {'blue': [], 'red': [], 'green': 1}
I have the initial key blue color with the last key green How do I compare key values? I also want to see if the red remains empty or not.
You can already use it to copy the original
< Code> import copy color = {'blue': 1, 'red': [], 'green': []} originators = copyPP (color) < > /> > ex>
Comments
Post a Comment