[Tutor] text files

Gina ginarf at comcast.net
Wed Jan 16 03:31:38 CET 2013


I have version 3

I am trying to read a text file ("the_file.txt") and then write a new 
file where the characters are in uppercase
but i don't know how/where i should use the .upper
I think i should use it where the ****** is, but i got errors when i 
tried that


text_file = open("the_file.txt", "r")
print(text_file.read())
text_file.close()

new_file = open("the_file_upper.txt", "w+")
new_file.write(*****)
print(new_file.read())
new_file.close()


More information about the Tutor mailing list