input: Write a function to compute the average salary of people from a CSV file named 'salary.csv'. The function should read the CSV file, skip the header, sum up all the salaries, and return the average. If the file is empty or does not exist, the function should return 0.
  
  
  def get_average_salary(filename):
      total = 0
      count = 0
      try:
          with open(filename, 'r') as csvfile:
              csvreader = csv.reader(csvfile)
              next(csvreader)
              for row in csvreader:
                  total += float(row[1])
                  count += 1
      except FileNotFoundError:
          return 0
      return total / count if count > 0 else 0
  
  # Test cases
  assert get_average_salary('salary_example.csv') == 2000.0
  assert get_average_salary('non_existent_file.csv') == 0
  assert get_average_salary('empty_file.csv') == 0
  
output: def get_average_salary(filename):
      total = 0
      count = 0
      try:
          with open(filename, 'r') as csvfile:
              csvreader = csv.reader(csvfile)
              next(csvreader)
              for row in csvreader:
                  total += float(row[1])
                  count += 1
      except FileNotFoundError:
          return 0
      return total / count if count > 0 else 0