这是我到目前为止尝试过的:
print('''You will have to enter a file name
Once the file name has been entered, the program will then print out your ASCII art''')
file_name = input('Enter file name: ')
with open(file_name) as file_handle:
for line in file_handle:
for x in f:
print(x)
答案 0 :(得分:0)
一个已注释的循环应该从代码中删除,并且应该打印行。
print('''You will have to enter a file name
Once the file name has been entered, the program will then print out your ASCII art''')
file_name = input('Enter file name: ')
with open(file_name) as file_handle:
for line in file_handle:
#for x in f:
print(line)