如题所述
tmp=list('ABCDEFG')with open(r'e:/wbwj.txt','w') as f: tmp=list('abcdefg') f.write((('%s '*len(tmp)).strip()+'\n') % tuple(tmp))