摘要:
import re with open("xx.txt","r",encoding="utf-8") as f: txt =f.read() print(txt) c =re.split("\W",txt) print(c) longest ="" for i in c: if len(i) >len(longest): longest =i print... 阅读全文
摘要:
https://www.imooc.com/article/36931 1.python字符串格式化中,%s和.format的主要区别是什么 python用一个tuple将多个值传递给模板,每个值对应一个格式符print(“ my name is %s ,im %d year old”%("gaox 阅读全文