标签:lte re模块 print hone filter findall span use none
1 user_info=‘phone:18612574474 qq:8068886262‘ 2 print (re.findall(‘\d*‘,user_info)) 3 print (filter(None, re.findall(‘\d*‘,user_info))) 4 [‘‘, ‘‘, ‘‘, ‘‘, ‘‘, ‘‘, ‘18612574474‘, ‘‘, ‘‘, ‘‘, ‘‘, ‘8068886262‘, ‘‘] 5 [‘18612574474‘, ‘8068886262‘]
标签:lte re模块 print hone filter findall span use none
原文地址:https://www.cnblogs.com/yspass/p/9409386.html