title: Difficulty creating random words under conditions
body: <p>I need k words to be generated, until the sum of all the characters that make up the list is equal to or greater than 25</p>
  <pre><code>    import random
      for x in range(k): 
          n=(&quot;a&quot;,&quot;b&quot;,&quot;c&quot;,&quot;d&quot;)
          cc=[''.join(random.choice(n) for _ in range(random.choice(range(2,5))))]
          print(cc)
  
      def sumt(input1):
  
          l = list(input1)
          total = sum(len(i) for i in l)
          return int(total)
  
      print(sumt([cc]))
  </code></pre>