input: Write a function to identify the longest word in a given sentence. The function should split the sentence into words and determine which word is the longest based on its length. If there are multiple words of the same length, it should return the first one encountered.
  def find_longest_word(sentence):
      words = sentence.split()
      longest_word = ""
      for word in words:
          if len(word) > len(longest_word):
              longest_word = word
      return longest_word
  assert find_longest_word("The rain in Spain stays mainly in the plain.") == "mainly"
  assert find_longest_word("This is a test sentence with some longer words") == "sentence"
  assert find_longest_word("Short words here") == "Short"
  assert find_longest_word("") == ""
  assert find_longest_word("Hello") == "Hello"
output: def find_longest_word(sentence):
      words = sentence.split()
      longest_word = ""
      for word in words:
          if len(word) > len(longest_word):
              longest_word = word
      return longest_word