input: Write a function to compute the average salary of people from the dataset 'salary.csv'. The function should return the average salary. If the dataset is empty, the function should return 0.
  assert get_average_salary('salary.csv')==2000.0
  assert get_average_salary('empty.csv')==0
  assert get_average_salary('test_salary.csv')==1500.0
output: def get_average_salary(filename):
      try:
          with open(filename, 'r') as file:
              lines = file.readlines()
              if not lines:
                  return 0
              total_salary = 0
              count = 0
              for line in lines:
                  try:
                      salary = float(line.strip())
                      total_salary += salary
                      count += 1
                  except ValueError:
                      continue
              if count == 0:
                  return 0
              return total_salary / count
      except FileNotFoundError:
          return 0