摘要:
class Solution(object): def repeatedSubstringPattern(self, s): """ :type s: str :rtype: bool """ # 方法一:效率稍微好一些 # n = len(s) # for i in range(1, ... 阅读全文
摘要:
一、方法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 思路看起来比较清晰简单 ,也可以保持之前的排 阅读全文