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
尝试修改此代码以搜索至少两个连续双字母的单词
答案 0 :(得分:-1)
我完全不明白你的问题。
l=['asd','aabb','ccddee']
for w in l:
if len(w)>1:
if len(w)==(2*len(set(w))):
print w