input: Write a python function to convert a given string into a valid Python identifier by removing non-alphanumeric characters and prepending an underscore if the first character is not alphabetic.
  assert convert_to_identifier("hello-world") == "helloworld"
  assert convert_to_identifier("123abc") == "_123abc"
  assert convert_to_identifier("$variable_name!") == "_variablename"
  assert convert_to_identifier("validIdentifier") == "validIdentifier"
output: def convert_to_identifier(s):
      result = ''.join(char for char in s if char.isalnum())
      if not result[0].isalpha():
          result = '_' + result
      return result