
Python
sinat_19371493
这个作者很懒,什么都没留下…
展开
-
Python 文字处理
首先需要:import string 然后有两种方法取代字符串中的某项: 方法1: >>> a='...fuck...the....world............' >>> b=a.replace('.',' ') >>> print b fuck the world 方法2: >>> a='...fuck...the....wo转载 2014-09-23 17:58:17 · 596 阅读 · 0 评论 -
Python 读写例子
def change(): output = open('helias2.csv','w') for line in open('helias.csv','r'): line_array = line.split('|') line_array[0] = 'E'+line_array[0].replace('-','_')原创 2014-09-23 18:02:17 · 408 阅读 · 0 评论