单选题

数据文件“abc.txt”中包含若干个英文单词,如图所示:

读取文件“abc.txt”中数据的Python程序段如下:

file = 'abc.txt'
word_b = []
for word in open(file):
    if word[0:1] = = 'a' and len(word)>4:
        word_b.append(word)

该程序段执行后,列表word_b中的数据为?(?)

A

文件“abc.txt”中所有包含字母“b”且长度大于4的单词

B

文件“abc.txt”中所有首字母为“a”且长度大于4的单词

C

文件“abc.txt”中所有第2个字母为“a”且长度大于4的单词

D

文件“abc.txt”中所有第1、2个字母均为“a”且长度大于4的单词

赣ICP备20007335号-2