摘要:
class Solution(object): def repeatedSubstringPattern(self, s): """ :type s: str :rtype: bool """ # 方法一:效率稍微好一些 # n = len(s) # for i in range(1, ... 阅读全文
posted @ 2019-02-21 14:22
小学弟-
阅读(123)
评论(0)
推荐(0)
摘要:
一、方法1 代码如下 ids = [1,2,3,3,4,2,3,4,5,6,1] news_ids = [] for id in ids: if id not in news_ids: news_ids.append(id) print news_ids 思路看起来比较清晰简单 ,也可以保持之前的排 阅读全文
posted @ 2019-02-21 10:12
小学弟-
阅读(256)
评论(0)
推荐(0)
浙公网安备 33010602011771号