def check_list(List, CheckValue): Result = True # Loop for Item in List: # Check if not Item == CheckValue: Result = False return Result # # Example # ListA = [1.0, 0.0, 0.0] CheckA = 0.0 print(check_list(ListA, CheckA)) # False ListB = [0.0, 0.0, 0.0] CheckB = 0.0 print(check_list(ListB, CheckB)) # True