摘要:
# re模块 # 对一个大篇幅的字符串指定按照一定的规则找出想要的字符串 import re s1 = "好好学习 天天向上" print(s1.find("天天")) # 5 print(re.findall("天天", s1)) # ['天天'] # \w 匹配字母中文数字下划线 # \W 匹配特殊字符 print(re.findall("\w", "太白 123 ABC-- *%"... 阅读全文
posted @ 2019-01-11 14:43
星满夜空
阅读(203)
评论(0)
推荐(0)

浙公网安备 33010602011771号