# 将12345转换为'12345' num = int(input("请输入一个整数")) num1 = num count = 0 s1 = "" while True: if num1 // 10 == 0: break count += 1 num1 = num1 // 10 while count >= 0: s = chr(num % 10 + 48) s1 = s + s1 num = num // 10 count = count - 1 print(s1)
python代码 将12345转换为'12345'
猜你喜欢
转载自blog.csdn.net/chen1042246612/article/details/81144703
今日推荐
周排行