随笔分类 - python
ptyhon 实践基本技巧
摘要:Python time strftime()方法 描述 Python time strftime() 函数接收以时间元组,并返回以可读字符串表示的当地时间,格式由参数format决定。 语法 strftime()方法语法: time.strftime(format[, t]) 参数 format 格
阅读全文
摘要:最近在编写Python脚本过程中遇到一个问题比较奇怪:Python脚本正常的,但执行报错"AttributeError: 'module' object has no attribute 'xxx'",其实是.pyc文件存在问题。 问题定位:查看import库的源文件,发现源文件存在且没有错误,同时
阅读全文
摘要:3.if else 4.字符串包含 第一种方法:in string = 'helloworld' if 'world' in string: print 'Exist' else: print 'Not exist' 第二种方法:find string = 'helloworld' if strin
阅读全文

浙公网安备 33010602011771号