摘要: # python 字符串前加f、r、b、u ### 一、字符串前加"f" 1. **%** 可以使用 % 格式化字符串。 ``` c = (250, 250) # 使用 % 格式化 s1 = "坐标为:%s" % c # TypeError: not all arguments converted 阅读全文
posted @ 2023-06-29 18:49 michaelchengjl 阅读(172) 评论(0) 推荐(0) 编辑
摘要: # python 中 fnmatch模块, textwrap 模块 **fnmatch模块** 查找文件 使用fnmatch来查找特定的文件,大部分情况下,使用字符串匹配查找特定的文件就能满足需求,如果需要更加灵活的字符串匹配,可以使用标准库中的fnmatch库,这个库专门用来进行文件名匹配,支持使 阅读全文
posted @ 2023-06-29 18:37 michaelchengjl 阅读(246) 评论(0) 推荐(0) 编辑