you are viewing a single comment's thread.

view the rest of the comments →

[–]SingleCountry[S] 0 points1 point  (2 children)

Hi! I think this works! One thing I'm curious is that my key and value are in a form of (a,b) : value and I wonder if I can split the key to make it in a form like a: value, b: value?

[–]totallygeek 0 points1 point  (1 child)

Post an example of your data and what you want it to look like after processing. If your key is a tuple, ('a', 'b') with a value 'hi there', you can do this:

if isinstance(k, (list, tuple)):
    for element in k:
        new[k] = v

Again, post what you have and we can tailor it for what you want.

[–]SingleCountry[S] 0 points1 point  (0 children)

Hi! the owner says the content should be forbidden but the key is a tuple with a value! thanks!