gpt4 book ai didi

python - 为什么 'r' 用于 Python 中的正则表达式?

转载 作者:太空宇宙 更新时间:2023-11-04 10:52:02 25 4
gpt4 key购买 nike

<分区>

Possible Duplicate:
What exactly do “u” and “r”string flags in Python, and what are raw string litterals?

p = re.compile(r'(\b\w+)\s+\1')

p.search('Paris in the the spring').group()

第一行r是什么意思?

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com