摘要: def pySum(n): a = list(range(n)) b = list(range(0,3*n,3)) c = [] for i in range(len(a)): c.append(a[i]**2+b[i]**3) return c import numpy def nySum(n): 阅读全文
posted @ 2018-09-29 11:45 safufu 阅读(187) 评论(0) 推荐(0) 编辑
摘要: fo = open('novel.txt','r',encoding='utf-8') #读取文件 str = fo.read() fo.close() print(str) str = str.lower() #全部转为小写 sep = '.,:;?!' #删除特殊字符 for a in sep: str = str.replace(a,' ') print(str) strl... 阅读全文
posted @ 2018-09-29 10:10 safufu 阅读(270) 评论(0) 推荐(0) 编辑