longest_word(s) that returns the longest word in the sentence s. If there is a tie, return the first one that appears.s = 'I love programming in python'
'programming'
'programming' has 11 characters, the most of any word.
s = 'cat dog owl bee'
'cat'
All words are 3 letters; the first one wins the tie.
Split into words, then use `max(words, key=len)` — `max` keeps the first maximal element on ties.