int值如果我有一个url
像examle/def/5/
,我试图找到int
值从url
使用我怎样才能从URL
re.findall([0-9],'examle/def/5/')
,但我得到一个错误。
Traceback (most recent call last): File "", line 1, in File "/usr/lib/python2.7/re.py", line 177, in findall return _compile(pattern, flags).findall(string) File "/usr/lib/python2.7/re.py", line 229, in _compile p = _cache.get(cachekey) TypeError: unhashable type: 'list'
我该怎么做?
什么错误?请分享一个回溯。 – geoffspear
回溯(最近通话最后一个): 文件 “”,1号线,在 文件 “/usr/lib/python2.7/re.py”,线路177,在的findall 回报_compile(图案,旗) .findall(字符串) 文件“/usr/lib/python2.7/re.py”,第229行,在_compile中 p = _cache.get(cachekey) TypeError:不可用类型:'list' –
请更新您的问题跟踪反而放在评论中。 – falsetru