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
相關文章
相關標籤/搜索