比偶工作大事记

Posted marigolci

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了比偶工作大事记相关的知识,希望对你有一定的参考价值。

1.单个文件数据清洗

import re
f=open("/Users/mingai/Downloads/4l8hA-1155-38.69.pdb","r")
lines=f.readlines()
f = open(‘/Users/mingai/Downloads/4l8hA-1155-38.69.txt‘,‘w‘)
ans=[]
patt = ‘-?d+.d+‘
for raw in lines:
list = []
while(re.search(patt,raw)):
c1 = re.search(patt, raw).group()
list.append(c1)
raw=raw.replace(c1,"",1)
if list != []:
ans.append(list[:3])
for i in ans:
if i != []:
f.write(str(i))
f.close()

以上是关于比偶工作大事记的主要内容,如果未能解决你的问题,请参考以下文章

json 可视代码工作室Angular with Firebase片段

哈斯克尔。我很困惑这个代码片段是如何工作的

创建自己的代码片段(CodeSnippet)

人生三件大事:生活-工作-学习之间的故事

append() 在这个代码片段中是如何工作的?与特定变量混淆[重复]

将数据从底部工作表对话框片段传递到片段