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

Popular posts from this blog

HTML/CSS - Automatically set height width from background image? -

php - Mysql Show Process - Sleep Commands and what to do -

c - What is the address of buf (the local variable in the main function)? -