input: Write a function to validate a list of emails. The function should return a boolean indicating whether a given email address is valid. If the given list is empty then return True.
  assert validate_mail_list(["example.user@gmail.com", "bad@example"])==False
  assert validate_mail_list(["test@example.com", "example.user@gmail.com"])==True
  assert validate_mail_list(["@example.com", "user@.com"])==False
  assert validate_mail_list(["valid@domain.com", "invalid@example"])==False
  assert validate_mail_list([])==True
output: def validate_mail_list(emails):
      if not emails:
          return True
      for email in emails:
          if not ('@' in email and '.' in email and email.index('@') > 0 and email.index('@') < email.rindex('.')):
              return False
      return True