摘要: def find_max_substr(astring): max_sub_str, temp = [], [] left_ptr, right_ptr = 0, 0 total = len(astring) while right_ptr < total: cur_str = astring[ri 阅读全文
posted @ 2021-11-08 21:27 keep2021 阅读(31) 评论(0) 推荐(0) 编辑
摘要: ''' 一个字符串 1dsl2323j2454665757 ,返回最长数字子串 返回:2454665757 ''' def num(a_str): max_number_temp,temp=[],[] i,j=0,len(a_str) while i<j: if a_str[i].isdigit() 阅读全文
posted @ 2021-11-08 20:57 keep2021 阅读(355) 评论(0) 推荐(0) 编辑