摘要:
1 import os 2 import datetime 3 import time 4 5 while True: 6 path = input('请输入文件保存地址:') 7 num = int(input('请输入创建文件的数量:')) 8 for i in range(num): 9 t 阅读全文
posted @ 2020-02-23 13:16
不着魔,不成佛
阅读(189)
评论(0)
推荐(0)
摘要:
1 import os 2 3 # 1)创建一个一级目录 4 path = 'c:\\demo' 5 6 if not os.path.exists(path): 7 os.mkdir(path) 8 print('目录创建成功') 9 else: 10 print('目录已经存在') 11 12 阅读全文
posted @ 2020-02-23 12:46
不着魔,不成佛
阅读(104)
评论(0)
推荐(0)
摘要:
1 def getcode(chinese): 2 """ 3 获取汉字对应的区位码 4 :param 单个汉字 5 :return:获取到的区位码 6 """ 7 barry = chinese.encode('gb2312') 8 code = '{:02d}'.format(barry[0] 阅读全文
posted @ 2020-02-23 12:43
不着魔,不成佛
阅读(254)
评论(0)
推荐(0)
摘要:
1 def jiecheng(num,zhishu): 2 """ 3 求一个数的幂指数 4 :param num: 5 :param zhi: 6 :return: 7 """ 8 print('结果是:') 9 restult = num ** zhi 10 return restult 11 阅读全文
posted @ 2020-02-23 12:42
不着魔,不成佛
阅读(155)
评论(0)
推荐(0)

浙公网安备 33010602011771号