Hello,
Newbie question here, so please bear with me.
Let's say I have a dictionary looking like this:
a = {"2323232838": ("first/dir", "hello.txt"),
"2323221383": ("second/dir", "foo.txt"),
"3434221": ("first/dir", "hello.txt"),
"32232334": ("first/dir", "hello.txt"),
"324234324": ("third/dir", "dog.txt")}
I want all values that are equal to each other to be moved into another dictionary.
matched = {"2323232838": ("first/dir", "hello.txt"),
"3434221": ("first/dir", "hello.txt"),
"32232334": ("first/dir", "hello.txt")}
And the remaining unmatched items should be looking like this:
remainder = {"2323221383": ("second/dir", "foo.txt"),
"324234324": ("third/dir", "dog.txt")}
Thanks in advance, and if you provide an example, please comment it as much as possible.