在线咨询
eetop公众号 创芯大讲堂 创芯人才网
切换到宽版

EETOP 创芯网论坛 (原名:电子顶级开发网)

手机号码,快捷登录

手机号码,快捷登录

找回密码

  登录   注册  

快捷导航
搜帖子
分享 【转】python 之fileinput模块
ghong6003 2018-3-25 14:15
fileinput模块可以对一个或多个文件中的内容进行迭代、遍历等操作。 该模块的input()函数有点类似文件 readlines()方法,区别在于: 前者是一个迭代对象,即每次只生成一行,需要用for循环迭代。 后者是一次性读取所有行。在碰到大文件的读取时,前者无疑效率更高效。 用fileinput 对文件进行循环遍历, ...
个人分类: Python|713 次阅读|0 个评论
分享 python 之re模块
ghong6003 2018-3-25 10:26
#!/usr/bin/env python # -*- coding: utf-8 -*- # ************************************************************ # File Name : reExe.py # Author : Hong Guo # Description : This file used to try to parse options from the command parameters # From &nb ...
个人分类: Python|822 次阅读|0 个评论
分享 【转】python 之time模块详解
ghong6003 2018-3-24 21:47
#!/usr/bin/env python # -*- coding: utf-8 -*- # ************************************************************ # File Name : genTimeString.py # Author : Hong Guo # Description : This file used to gen time string. # From : # **************** ...
个人分类: Python|1167 次阅读|0 个评论
分享 【转】python 之解析命令行参数
ghong6003 2018-3-24 12:31
#!/usr/bin/env python # -*- coding: utf-8 -*- # ************************************************************ # File Name : optParse.py # Author : Hong Guo # Description : This file used to try to parse options from the command parameters # From ...
个人分类: Python|1445 次阅读|0 个评论
分享 【转】python 之OS模块详解
ghong6003 2018-3-24 10:55
python之OS模块详解
个人分类: Python|649 次阅读|0 个评论
分享 Some Methods in Python
ghong6003 2018-2-14 11:13
1. The methods of Variable: String Methods: (1) name.endswith('a') # if the variable ends with sring 'a' (2) name.startswith('a') (3) name.lower() # Change the ...
个人分类: Python|480 次阅读|0 个评论

本页有 2 篇日志因作者的隐私设置或未通过审核而隐藏

关闭

站长推荐 上一条 /1 下一条

小黑屋| 关于我们| 联系我们| 在线咨询| 隐私声明| EETOP 创芯网
( 京ICP备:10050787号 京公网安备:11010502037710 )

GMT+8, 2024-3-29 18:41 , Processed in 0.012695 second(s), 3 queries , Gzip On, Redis On.

eetop公众号 创芯大讲堂 创芯人才网
返回顶部