摘要: 第一种方法:in string = 'helloworld' if 'world' in string: print 'Exist' else: print 'Not exist' 第二种方法:find string = 'helloworld' if string.find(’world‘) == 阅读全文
posted @ 2019-05-08 11:38 老呂 阅读(282) 评论(0) 推荐(0) 编辑
摘要: 获取当前文件的路径d,获得d路径的父级目录parent_path: 获得规范的绝对路径: 阅读全文
posted @ 2019-05-08 10:12 老呂 阅读(157) 评论(0) 推荐(0) 编辑
♥ 作者:老呂 ♠ 出处:http://www.cnblogs.com/gisxiong/ ♦本文首发于:博客园,欢迎转载,请保留原文出处! ♣ 本文如对您有帮助,还请多推荐下此文,如有错误欢迎指正,相互学习,共同进步