I have been trying to create a small function for a menu project I have where the function takes a string as input and capitalizes the first letter of each sentence. I think I'm pretty close to having it right, but it keeps giving me a concatenation error that I can't seem to fix. Anyone know where I went wrong here?
def fix_capitalization(usrStr):
s1 = usrStr.split(". ")
s2 = [s1[0].capitalize() + s1[1:] for i in s1]
st2 = '. '.join(s2)
return st2