最佳答案
我有一些类似这样的代码:
>>> import re
>>> p = re.compile('my pattern')
>>> print p
_sre.SRE_Pattern object at 0x02274380
是否可以从 p
变量获得字符串 "my pattern"
?