Skip to content

Commit 17cbc4b

Browse files
committed
ex 7 added
1 parent c190bea commit 17cbc4b

File tree

2 files changed

+20
-0
lines changed

2 files changed

+20
-0
lines changed

Ex_07/ex_07_01.py

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
# Use words.txt as the file name
2+
fname = input("Enter file name: ")
3+
fh = open(fname)
4+
5+
6+
for line in fh:
7+
line = line.rstrip()
8+
print(line.upper())
9+
10+

File/ex_07_01.py

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
# Use words.txt as the file name
2+
fname = input("Enter file name: ")
3+
fh = open(fname)
4+
5+
6+
for line in fh:
7+
line = line.rstrip()
8+
print(line.upper())
9+
10+

0 commit comments

Comments
 (0)