Home > other >  How to compare with each other in the list
How to compare with each other in the list

Time:10-01

Data=https://bbs.csdn.net/topics/[{' a ': [{0: [' hello', 'what']}, {1: [' nihao ', 'hello,']}, {2: [' aa ', 'bb']}]}, {' b ': [{0: [" hello ", "shenme"]}, {1: [' what' and 'yyy]}, {2: [' RRR', 'aa']}, {3: [' aa ', 'GGG]}]}, {' c' : [{0: [' hello ']}, {1,} [' hello ', 'uuu]]}]

The data list for medium a dictionary, the combination of the values in the dictionary to list;
Such as a 'hello' in the dictionary also has a b in the dictionary, it returns {' ab_hello: [0, 0]}, 'hello' in the dictionary also has a c, it returns {' ac_hello: [0, 1]}
Eventually return should be [{' ab_hello: [0, 0]}, {' ac_hello: [0, 1]}, {' bc_hello: [0, 1]...}]
Is comparing two same items, and give the corresponding key value;
  • Related