望月❣️🌸君に花束を
@Mochigetsu2525
Mon, May 23, 2022 1:31 PM
資訊作業集中噗,我可能會寫代碼寫到起笑
望月❣️🌸君に花束を
@Mochigetsu2525
Mon, May 23, 2022 1:32 PM
第一題
望月❣️🌸君に花束を
@Mochigetsu2525
Mon, May 23, 2022 1:32 PM
inf = "C:/works/twilight 1.txt"
outf = "C:/works/twilight 1 out.txt"
def main():
infile = open(inf, "r", encoding='UTF-8')
outfile = open(outf, "w", encoding='UTF-8')
linelist = infile.readlines()
for line in linelist:
for word in line:
outfile.write(word)
infile.close()
outfile.close() main()
望月❣️🌸君に花束を
@Mochigetsu2525
Mon, May 23, 2022 1:32 PM
inf = "C:/works/twilight 1.txt"
def main():
infile = open(inf, "r", encoding='UTF-8')
linelist = infile.readlines()
print(linelist[:20])
main()
望月❣️🌸君に花束を
@Mochigetsu2525
Mon, May 23, 2022 1:35 PM
inf = "C:/works/twilight 1.txt"
def main():
infile = open(inf, "r", encoding='UTF-8')
linelist = infile.readlines()
print([''.join(s.split()) for s in linelist[:20]])
main()
望月❣️🌸君に花束を
@Mochigetsu2525
Mon, May 23, 2022 3:16 PM
Mon, May 23, 2022 4:37 PM
我寫完第一題了(剩下的等寫完再放上來)
望月❣️🌸君に花束を
@Mochigetsu2525
Mon, May 23, 2022 4:30 PM
第二題真的不太確定所以等教材公布
載入新的回覆
outf = "C:/works/twilight 1 out.txt"
def main():
infile = open(inf, "r", encoding='UTF-8')
outfile = open(outf, "w", encoding='UTF-8')
linelist = infile.readlines()
for line in linelist:
for word in line:
outfile.write(word)
infile.close()
outfile.close() main()
def main():
infile = open(inf, "r", encoding='UTF-8')
linelist = infile.readlines()
print(linelist[:20])
main()
def main():
infile = open(inf, "r", encoding='UTF-8')
linelist = infile.readlines()
print([''.join(s.split()) for s in linelist[:20]])
main()