PY
py
1
2
3
4
5
6
7
8
9
10
i=0
file=open("ex15_sample.txt","r")
while i<3:
print(file.read().splitlines()[i])
x=input("please press 1 to continue \n" )
if x==1:
i=i+1
else:
print("goodbye")
exit()
Enter to Rename, Shift+Enter to Preview
OUTPUT
Run