摘要:
1) f-string Pyhon从3.6开始,新增了f-string方法: name = "Mike" age = 18print(f"My name is {name} and I'm {age} yeras old")#My name is Mike and I'm 18 yeras old 阅读全文
摘要:
使用 .* import re data = "This is new book <testInfo> info"#如果是匹配,开始符后面的所有字符,只能用.* 如果使用 .*?就会匹配不到任何字符 result = re.findall("<(.*)",data) print(result) #如 阅读全文