how to apply a logical operator to all elements in a python list,all(a_list)