摘要: class Solution: def lengthOfLastWord(self, s): """ :type s: str :rtype: int """ l = [] for i in s[::-1].lstrip(): if i != ' ': ... 阅读全文
posted @ 2018-10-17 12:03 September· 阅读(473) 评论(0) 推荐(0) 编辑
摘要: class Solution: def addBinary(self, a, b): """ :type a: str :type b: str :rtype: str """ a, b = int(a, 2), int(b, 2) return bin(a + b)[2:] i = Solutio 阅读全文
posted @ 2018-10-17 12:02 September· 阅读(488) 评论(0) 推荐(0) 编辑