input: Write a function to compute the average salary from a dataset stored in a CSV file. The function should take the filename as input and return the average salary of all entries in the file.
  assert get_average_salary('salary.csv')==2000.0
output: def get_average_salary(filename):
      total_salary = 0
      count = 0
      with open(filename, 'r') as file:
          for line in file:
              data = line.strip().split(',')
              if len(data) > 1:
                  total_salary += float(data[1])
                  count += 1
      return total_salary / count if count > 0 else 0