f = open("text.txt","r")
for x in f:
capitalized_version = x.capitalize()
print(capitalized_version)
text.txt contains: hello my name is
and it converts it to: Hello my name is
but i want to capitalize all first letters, so Hello My Name Is from the text.txt and put it in a new file text2.txt
This is my first post on stackoverflow so help would be appreciated! :)