Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
def three_doubles(s): for i in range(0, len(s)-5); if s[i] = s[i+1] and s[i+2] == s[i+3] and s[i+4] == s[i+5]: return True return False
尝试修改此代码以搜索具有至少两个连续双字母的单词
我不明白你问的是什么。
l=['asd','aabb','ccddee'] for w in l: if len(w)>1: if len(w)==(2*len(set(w))): print w