symons

___________每一天都是幸福的!!

  博客园  ::  :: 新随笔  ::  :: 订阅 订阅  :: 管理

2014年4月8日

摘要: 这段代码就是去掉文档中的空行,如果用C语言来写也是比较简单的,但是在python中真是太简单了。。。 1 #!/usr/bin/python 2 # Filename:delblankline.py 3 # -*- coding: utf-8 -*- 4 5 import sys 6 7 def delblankline(infile, outfile): 8 """ Delete blanklines of infile """ 9 infp = open(infile, "r")10 outfp = open( 阅读全文
posted @ 2014-04-08 21:44 symons 阅读(211) 评论(0) 推荐(0)