input: Write a python function to convert a sentence to Pig Latin.
  assert to_pig_latin("This is a sentence") == "hisTay isway away entencesay "
  assert to_pig_latin("apple orange") == "appleway orangeway "
  assert to_pig_latin("hello world") == "ellohay orldway "
output: def to_pig_latin(sentence):
      def convert_word(word):
          if word[0] in 'aeiouAEIOU':
              return word + 'way'
          else:
              return word[1:] + word[0] + 'ay'
      
      words = sentence.split()
      pig_latin_words = [convert_word(word) for word in words]
      return ' '.join(pig_latin_words) + ' '