zz=input(("请输入您要转换的数字:"))
ws=str(len(zz))
z=int(zz)
while z>=10:
b=int(z/(10*(ws-1)))
z=z-1
b2=str(sz)
print(b2)
pythonIDLE的报错:
Traceback (most recent call last):
File "C:\Users\A\Desktop\数字2.py", line 5, in
b=int(z/(10*(ws-1)))
TypeError: unsupported operand type(s) for -: 'str' and 'int'