题解 | #在字符串中找出连续最长的数字串#
在字符串中找出连续最长的数字串
http://www.nowcoder.com/practice/2c81f88ecd5a4cc395b5308a99afbbec
import re
while True:
try:
string = input()
lists = re.findall('\d+', string)
lens = max([int(len(x)) for x in lists])
for i in lists:
if len(i) == lens:
print(i, end='')
print(','+str(lens))
except:
break