n = int(input('How many tracks are in the album?: '))
for i in range(n):
line = raw_input('Next Track: ')
lines.append(line)
它说 line = raw_input('Next Track: ') 是文本将保存到文件的位置。但是,如果有,比如说,20,你会怎么做,以便记录和保存每首曲目?
这是编写文本的代码:
f.write("Track Name/Rating: " + line +"\n")