-3
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

尝试修改此代码以搜索具有至少两个连续双字母的单词

4

1 回答 1

-1

我不明白你问的是什么。

l=['asd','aabb','ccddee']
for w in l:
    if len(w)>1:
        if len(w)==(2*len(set(w))):
            print w
于 2013-02-27T20:53:12.227 回答