我有一长串包含字典的元组。我想删除“权重”值为 1 的元组。
List_example = [('WHT', 'WML, {'weight': 48}),
('WHHT','CCH', {'weight': 53}),
('WRT','KUF', {'weight': 1}),
('WHHT','RWH',{'weight': 1}))]
期望的输出:
List_example = [('WHT', 'WML, {'weight': 48}),
('WHHT','CCH', {'weight': 53}))]
慕姐4208626
相关分类