import coretable
def capwords(s, sep=None)
Split the argument into words using split, capitalize each word using capitalize, and join the capitalized words using join. Note that this replaces runs of whitespace characters by a single space.
coretable