Created
August 16, 2015 04:24
-
-
Save KKarthikeya/47adee1a14deaab5adc5 to your computer and use it in GitHub Desktop.
1 Write a program that prompts for a file name, then opens that file and reads through the file, and print the contents of the file in upper case. Use the file words.txt to produce the output below. You can download the sample data at http://www.pythonlearn.com/code/words.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
for data in open(raw_input("Enter file name: ")): | |
print data.rstrip().upper() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
for data in open(raw_input("Enter file name: ")):
print data.rstrip().upper()