摘要: 1.Two Sum 给定数组nums和目标值target,求nums中两个a,b的索引,a,b唯一满足a + b = target。 class Solution: def twoSumb(self, nums: List[int], target: int) -> List[int]: d = { 阅读全文
posted @ 2021-05-20 22:03 tianle1998 阅读(60) 评论(0) 推荐(0)
摘要: python中and和or进行逻辑运算,但并不返回布尔值而是返回实际参加运算的值之一。 1.and and符号返回第一个使其为假,若全为真则返回最后一个真值 2.or or符号返回第一个使其为真的值,若全为假则返回最后一个假值 阅读全文
posted @ 2021-05-20 21:02 tianle1998 阅读(218) 评论(0) 推荐(0)