首页 > 代码库 > Exercise 15: Reading Files

Exercise 15: Reading Files

from sys import argvscript, filename = argvtxt = open(filename)print "Here‘s your file %r:" % filename print txt.read()print "Type the filename again:"file_again = raw_input("> ")txt_again = open(file_again)print txt_again.read()

 

Exercise 15: Reading Files