[Solved] Python converting text file to all caps


Using Python 2.7.6 this works for me:

filename = raw_input("File Name: ")
with open(filename, 'r+') as f:
    text = f.read()
    f.seek(0)
    f.write(text.upper())
    f.truncate()

2

solved Python converting text file to all caps