19 lines
420 B
Python
Raw Normal View History

2021-04-19 20:24:26 +00:00
from sys import argv
script, filename = argv
txt = open(filename)
print(f"Here's your file {filename}")
print(txt.read())
print("Type the filename again: ")
fileAgain = input("> ")
txtAgain = open(fileAgain)
print(txtAgain.read())
#It seems that you can only have one active file stream open at a time. So in order to print the txt variable, we would need to redefine it.
#txt = open(filename)
#print(txt.read())