withopen("2a raw.txt")as fh: rea = fh.readlines()#print (rea)no_list =lambdalist: int((sum([(len(list[i])) for i inrange(len(list))]))/3)#簡寫一個for迴圈命名為no_list,目的為求出迴圈執行次數(14次)t =list()#命名空清單tfor k inrange(len(rea)): a = rea[k] b = a.split()#分割每一行第k位#print(b)for i inrange(0,len(b),3): c = b[i:i+3]#每三字串為一次進行迴圈 t.append(c)#加入清單tfor g inrange(no_list(t)):#range = 14print("第"+str(g+1) +"組:"+str(t[g]))