摘要:
简单实现.h,.c文件修改编码为utf-8格式。 import os; import chardet; file_path = "."; for root,dirs,files in os.walk(file_path): # print("root",root) # print("files",f 阅读全文
摘要:
import re def main(): s = '1 - 2 * ( (60-30 +(-40/5) * (9-2*5/3 + 7 /3*99/4*2998 +10 * 568/14 )) - (-4*3)/ (16-3*2) )' s = s.replace(" ","") print(s) print('s is ',eval(s)) while ... 阅读全文
摘要:
def sendRedPacket(money,num): sum_money = 0 ret = [] money *= 100 while sum_money != money: sum_money = 0 ret.clear() l = random.sample(range(1,money),num - 2)... 阅读全文
摘要:
#正则表达式 #字符组 [] 写在中括号的内容,都出现在下面的某一字符的位置上都是符合规则的 #[0-9] 匹配数字 #[a-zA-Z] 匹配字母 #元字符 \w 匹配数字字母下划线(同[0-9a-zA-Z_]) #\d 匹配数字 #\s 匹配所有空白字符 (回车,制表符,空格) 同[\t\n ] 阅读全文
摘要:
<iframe id="embed_dom" name="embed_dom" frameborder="0" style="display:block;width:525px; height:245px;" src="https://www.processon.com/embed/mind/5d0 阅读全文
摘要:
def getLine(filename): with open(filename,encoding='utf-8') as f: tittle = f.readline().strip() tittle = tittle.split(',') # print(tittle) for i in f: ... 阅读全文