input: Write a function to identify the longest word in a given sentence. If there are multiple words with the same longest length, return the first one encountered.
  def find_longest_word(sentence):
      words = sentence.split()
      longest_word_str = ""
      for word in words:
          if len(word) > len(longest_word_str):
              longest_word_str = word
      return longest_word_str
  
  assert find_longest_word("The rain in Spain stays mainly in the plain.") == "mainly"
  assert find_longest_word("Quick brown fox jumps over the lazy dog") == "Quick"
  assert find_longest_word("Hello world") == "world"
  assert find_longest_word("Python is amazing") == "amazing"
  assert find_longest_word("") == ""
output: def find_longest_word(sentence):
      words = sentence.split()
      longest_word_str = ""
      for word in words:
          if len(word) > len(longest_word_str):
              longest_word_str = word
      return longest_word_str