题解 | #在字符串中找出连续最长的数字串#
在字符串中找出连续最长的数字串
https://www.nowcoder.com/practice/2c81f88ecd5a4cc395b5308a99afbbec
while True: try: st = input() for i in st: if not i.isdigit(): st = st.replace(i, " ") st = st.split() max_len = 0 res = "" for j in st: if len(j) > max_len: max_len = len(j) for j in st: if len(j) == max_len: res = res + j print(str(res) + "," + str(max_len)) except: break