计算机程序设计(Python)-21级 (南京信息工程大学)

  • 实验五 付子安 202183820035

    1 with open('data1_1.txt','r',encoding='utf-8') as f: data=f.readlines() n=0 for line in data: if line.strip('\n')=='': continue n+=1 print('共{n}行') w
    阳光快楽男孩   2022-05-17 11:46   0   4
  • 实验五 文件应用编辑

    task3 with open('data3.txt','r',encoding='utf-8') as f : with open('data3_processed.txt', 'w', encoding='utf-8') as f1: data=f.read().strip().split('\
    haze13327620097   2022-05-17 11:42   2   6
  • 实验五作业

    with open('data3.txt','r',encoding='utf-8')as f1: with open('data3_processed.txt','w',encoding='utf-8')as f2: a=f1.read().split('\n') a.pop(0) c=[] d=
    SHADOW&KING   2022-05-17 11:22   0   4
  • 实验5

    with open('data3.txt','r',encoding='utf-8')as f1: with open('data3_processed.txt','w',encoding='utf-8')as f2: a=f1.read().split('\n') a.pop(0) c=[] d=
    q^   2022-05-17 10:42   0   3
  • 实验五

    with open('data3.txt','r+', encoding='UTF-8') as f: num = [line.strip('\n') for line in f] num.pop(0) num_print = [eval(i) for i in num] print(f"原始数据:
    一个幽灵   2022-05-17 10:21   0   3
  • 实验5 文件应用编程

    实验任务3 with open('data3.txt','r',encoding='utf-8') as f: be=[] b=f.readlines() for i in b[1::]: i=eval(i.strip('\n')) be.append(i) print(f'原始数据:\n{be}'
    Embeddd   2022-05-17 01:17   0   8
  • 实验五

    with open('data3.txt','r+', encoding='UTF-8') as f: x = [line.strip('\n') for line in f] x.pop(0) x_print = [eval(i) for i in x] print(f"原始数据:\n{x_pri
    卞康耀   2022-05-17 00:01   1   3
  • 实验5 文件应用编程

    #task3 with open('data3.txt','r',encoding='utf-8')as f1: with open('data3_processed.txt','w',encoding='utf-8')as f2: a=f1.read().split('\n') a.pop(0)
    孙艺欣   2022-05-16 23:54   0   4
  • 实验5 文件应用编程

    with open('data3.txt','r',encoding='utf-8') as f: data=f.readlines() f.close() with open('data3_proxessed.txt','w',encoding='utf-8') as b: a=['四舍五入后数据
    一壶花茶   2022-05-16 23:47   0   2
  • 实验5

    with open('data3.txt', 'r', encoding='utf-8') as f: data = f.read().split('\n') yuanshishuju = data.pop(0) data1 = [eval(i) for i in data] data2 = [ro
    wfffww   2022-05-16 23:45   0   3