标签:sdi 编写 style orm 正则表达 div 模板 长度 字符
s = input("请输入一个包含整数的字符串:") s1 = ‘‘ number = ‘‘ index = 0 d = {} print(len(s)) for i in range(len(s)): c = s[i] if c.isdigit(): number += c else: if len(number) > 0: # ab34cd54ab45 ab{number0}cd{number1}ab s1 += "{{number{}:010}}".format(index) d[‘number‘ + str(index)] = int(number) index += 1 number = ‘‘ s1 += c if len(number) > 0: s1 += "{{number{}:010}}".format(index) d[‘number‘ + str(index)] = int(number) print(s1) print(s1.format_map(d))
标签:sdi 编写 style orm 正则表达 div 模板 长度 字符
原文地址:https://www.cnblogs.com/ppystudy/p/12146981.html