github我的刷题 https://github.com/chaor/LeetCode_Python_Accepted | 我翻译的python3.4官网教程 kitt.me/py3
class Solution: # @return an integer def reverse(self, x): str_x = str(x) if str_x[0] == '-': return int('-' + str_x[-1:0:-1]) else: return int(str_x[::-1])