Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
added exercise 15 and sample text file
- Loading branch information
1 parent
928b223
commit 843d396
Showing
2 changed files
with
18 additions
and
0 deletions.
There are no files selected for viewing
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
Original file line number | Original file line | Diff line number | Diff line change |
---|---|---|---|
@@ -0,0 +1,15 @@ | |||
from sys import argv | |||
|
|||
script, filename = argv | |||
|
|||
txt = open(filename) | |||
|
|||
print "Here's your file %r:" % filename | |||
print txt.read() | |||
|
|||
print "I'll also ask you to type it again:" | |||
file_again = raw_input("> ") | |||
|
|||
txt_again = open(file_again) | |||
|
|||
print txt_again.read() |
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
Original file line number | Original file line | Diff line number | Diff line change |
---|---|---|---|
@@ -0,0 +1,3 @@ | |||
This is stuff I typed into a file. | |||
It is really cool stuff. | |||
Lots and lots of fun to have in here. |