title: All Five letter words with three character repeats?
body: <p>I created 5 for loops that go through each letter in the alphabet and then add those all into a list. I then take that list and for each letter I check if that letter has 3 character repeats and then break. However, this is obviously extremely inefficient and my computer is taking very long to return a result. Does anyone have any better ideas on how I can do this and improve the runtime? 
  Examples would be : cccde, yxxxz btw i can't import other libraries other than math, random, string </p>
  
  <pre><code>#generate all possible 5 letter combinations without repeats 
      for one in alpha:
          for two in alpha:
              for three in alpha:
                  for four in alpha: 
                      for five in alpha:
                          key = str(one+two+three+four+five)
                          if (key in list1) == False:
                              list1.append(key)
  
      #filter down to ones with three repeated letters:     
      for word in list1:
          for letter in word: 
              if word.count(letter) == 3:
                  list2.append(word)
                  break```
  </code></pre>