input: Write a function to convert an English sentence to Pig Latin.
  assert pig_latin('hello world') == 'ellohay orldway'
  assert pig_latin('python is fun') == 'ythonpay isway unfay'
  assert pig_latin('i am learning') == 'iway amway earninglay'
output: def pig_latin(sentence):
      def convert_word(word):
          if word[0] in 'aeiou':
              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)