message: hanle strings with spaces
diff: #
  class Solution(object):
  - def myAtoi(self, str):
  + def atoi(self, str):
  """
  :type str: str
  :rtype: int
  @@ -43,6 +43,9 @@ class Solution(object):
  while i < len(str) and str[i].isspace():
  i += 1
  + if len(str) == i:
  + return result
  + else:
  sign = 1
  if str[i] == "+":
  i += 1
  @@ -59,6 +62,7 @@ class Solution(object):
  return sign * result
  if __name__ == "__main__":
  + print Solution().atoi("")
  print Solution().atoi(" ")
  print Solution().atoi("-1")
  print Solution().atoi("2147483647")
  