下列关于处理data.txt单词文件的Python程序段功能的说法,正确的是?
小张近阶段要学习的英文单词存储在data.txt文件中,文件每行存储一个单词,内容如下:
China
computer
machine
capsule
serial
处理该文件的Python程序段如下:
file = open("data.txt")
for word in file:
if word[0:1] == "c":
continue
else:
print(word)
file.close()
正在加载题目数据…
子题
该题型需在试卷/作业中作答,单题练习暂不支持
答案解析