[Python #2] create e15.py

This commit is contained in:
kjg 2020-05-22 21:19:18 +09:00
parent 5b5bfe07ca
commit 8be2fe479d
3 changed files with 25 additions and 0 deletions

View file

@ -0,0 +1,19 @@
from sys import argv
script, filename = argv
txt = open(filename)
print(f"Here's your file {filename}: ")
print(txt.read())
txt.close()
print("Type the filename again : ")
file_again = input("> ")
txt_again = open(file_again)
print(txt_again.read())

View file

@ -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.

View file

@ -81,3 +81,6 @@ how to use key input with print
how to use an argument when you run script
**** ex14
how to use an argument with input
*** Python #3:
**** ex15
How to use read function from file