Leetcode-Python 字符串转换整数(atoi)

class Solution: def myAtoi(self, s: str) -> int: s = s.strip(' ') string = '0' if len(s) > 0: if s[0] == '-' or s[0].isdigit() or s[0] == '+': s
相关文章
相关标签/搜索