This is python code and I am new to programming and I can't get just the first word of the sentence to capitalize.
def main():
input= 'the money is in the bag. however you dont want it.'
words = input.split('.')
capitalized_words = []
for word in words:
word=word.strip()
title_case_word = words[0].upper()
capitalized_words.append(title_case_word)
output = '.'.join(capitalized_words)
print(output)
main()
it is returning:
>>>
THE MONEY IS IN THE BAG.THE MONEY IS IN THE BAG.THE MONEY IS IN THE BAG
>>>
Can anyone help???