Try this: >>> { k: v['id1'] for k,v in a.items() if 'id1' in v } {'key3': [4, 5, 6], 'key1': [0, 1, 2]}. For Python 2.x you might prefer to ...
確定! 回上一頁