0 points

Reading Files in Python


dashboard

Sun Jun 07 2020 12:58:31 GMT+0000 (UTC)

Posted by @Amna #python

from sys import argv

script, filenames = argv

txt = open(filename)

print(f"Here's your life {filename}:")
print(txt.read())

print("Type the filename again:")
file_open = input(">")

txt_again = open(file_again)
print(txt_again.read())
content_copy Copy

https://www.amazon.com/Learn-Python-Hard-Way-Introduction/dp/0134692888/ref=pd_lpo_14_img_0/145-2038954-9524128?_encoding=UTF8&pd_rd_i=0134692888&pd_rd_r=2c1aff3f-60bb-490b-a2d0-dfc06d81970a&pd_rd_w=t9wy6&pd_rd_wg=Bmxlp&pf_rd_p=7b36d496-f366-4631-94d3-61b87b52511b&pf_rd_r=RTCDC9M99JAV7NJ30VVE&psc=1&refRID=RTCDC9M99JAV7NJ30VVE