Here is the solution I came up with, but it always fail the test case when using amount '1534236469' which seems still within 32 bits, could anyone please give any suggestions.

```
class Solution(object):
def reverse(self, x):
if x.bit_length() < 32:
if x >= 0:
return int(str(x)[::-1])
else:
x *= -1
reverse_temp = str(x)[::-1]
return int('-' + reverse_temp)
else:
return 0
```