[Solved] Python else condition prints several times

You are always printing something when you are testing, use a temporary variable and print the result after scanning the full list: success = False for i in sheet_data: if (i[0] == “BN”) and (i[1] == “YOU”): found_list.append(i) success = True if success: print(“Success”) else: print(“error”) solved Python else condition prints several times