240 发简信
IP属地:浙江
  • write_csv_dict

    import csv # newline='' 不会有空行 w/a 覆盖/追加读写 file =open('uuu.csv','w',encod...

  • read_csv_dict

    # 打开文件 import csv file =open('name1.csv','r',encoding='utf8') # 以csv读取数据...

  • write_csv

    import csv # newline='' 不会有空行 w/a 覆盖/追加读写 file =open('tttt.csv','w',enco...

  • read_csv

    # 打开文件 import csv file =open('name1.csv','r',encoding='utf8') # 以csv读取数据...

  • write_txt

    # 打开文件 w/a 覆盖/追加写入 file =open('aa.txt',mode='w',encoding='utf8') # 写入数据 ...

  • read_txt

    # 打开文件 file =open('users.txt',mode='r',encoding='utf8') # 读取一行数据 title =...

  • 乘法表

    for iin range(1,10): for jin range(1,i+1): print(j,'*',i,'=',i*j," ",end...

  • random_range

    # 数字范围 from randomimport choice, random for iin range(1,10,2): print(i) ...

  • Tuple

    tup= (1,2,3,4,6,6,6) # 按下标取元素 t1 =tup[0] t2 =tup[2] print(t1,t2) # 循环取元素...