题解 | #数字颠倒#
数字颠倒
http://www.nowcoder.com/practice/ae809795fca34687a48b172186e3dafe
Python标准解法
nums = str(input()) #int-to-string i = len(nums)-1 ans = [] while i >= 0: ans.append(nums[i]) i -= 1 rev = ''.join(ans) #array-to-string print(rev)
数字颠倒
http://www.nowcoder.com/practice/ae809795fca34687a48b172186e3dafe
Python标准解法
nums = str(input()) #int-to-string i = len(nums)-1 ans = [] while i >= 0: ans.append(nums[i]) i -= 1 rev = ''.join(ans) #array-to-string print(rev)
相关推荐