Used to determine whether all elements in the given iterable parameter iterable are TRUE, if so, return True, otherwise return False.
Elements are True except 0, empty, None, False.
The opposite of all()
all(iterable)
>>> all(['a', 'b', 'c', 'd']) # list list, none of the elements are empty or 0True>>> all(['a', 'b', '', 'd']) # list list, there is an empty elementfalse>>> all([0, 1, 2, 3]) # list list, there is an element that is 0false>>> all(('a', 'b', 'c', 'd')) # tuple, none of the elements are empty or 0True>>> all(('a', 'b', '', 'd')) # tuple, there is an empty elementfalse>>> all((0, 1, 2, 3)) # tuple tuple, there is an element that is 0false>>> all([]) # empty listTrue>>> all(()) # empty tupleTrue
def testfunc(page, locator, rearg, *args):print(type(page), page)print('locator: ', locator)print('url: ',rearg)print('args: ',args)def is_pass(df_result):for i in range(len(df_result)):if df_result[i] == 'pass' or df_result[i] == '':df_result[i] = 1else:df_result[i] = 0if 0 in df_result:return Falseelse:return True