def headAndFoot(s):
"""precondition: s is a string containing lower-case words and spaces
The string s contains no non-alpha characters.
postcondition: For each word, capitalize the first and last letter.
If a word is one letter, just capitalize it. """
last = len(s) - 1
x = s.title()
y = x.split()
return y
我需要做哪些改变?