On 12/24/2015 5:04 PM, KP wrote:
Given:cfg = {'c': ('3840', '1024'), 'p1': {'gpio': '1', 'id': '4', 'coord': ('0', '0', '1280', '1024')}, 'p2': {'gpio': '2', 'id': '5', 'coord': ('1280', '0', '2560', '1024')}, 'p3': {'gpio': '3', 'id': '6', 'coord': ('2560', '0', '3840', '1024')}} for config in cfg: if config != 'canvas': print config Is there an idiom that combines the 'for...' & the 'if..' lines into one?
No. -- Terry Jan Reedy -- https://mail.python.org/mailman/listinfo/python-list