# Employees Example # Count how many women earn more than $70,000. # Read input from the input file employees.txt: # Open input file fin = open("employees.txt", "r") # Initialize count to zero. count = 0 # Read and throw away header line. fin.readline( ) # Process file. line = fin.readline( ) while line: fields = line.split(",") gender = fields[1].strip( ) salary = float(fields[4].strip( )) if gender == "F" and salary >= 70000: count += 1 line = fin.readline( ) fin.close( ) print(f"There are {count} women with salary more than $70,000.")