输入一串字符,修改其中的数字后将字符串输出修改要求如下:0123456789—>2345678901(用上ord、chr)
s = '0123456789' lst1 = [ord(i) for i in s[2:]] lst2 = lst1 + [ord(i) for i in s[:2]] b = ''.join([chr(i) for i in lst2]) print(b)