for product in chara: if (product[2] is not None) or (product[3] is not None): break ...