title: Sort out words that dont have these letters, Python
body: <h2>Trying to sort out words that do not have the yellow letters (yl).
  currently it doesn't require them to have both... I need it to have both
  get it to print just [again]</h2>
  <p>-0<br />
  -'g','i','n'<br />
  -'o','e','l'</p>
  <pre><code>import sys
  import time
  #list of words that are available
  list0 = [
    'again',
    'alone',
    'align',
  ]
  cq = 0
  s1 = ''
  l1 = 0
  dw = ''
  yl = ''
  
  print(&quot;it's location is -1 to -5 (last to first) or 0 to 4 (first to last)&quot;)
  print(&quot;grey letter format is - '_','_', for every grey letter&quot;)
  
  if cq == 0:
      s1 = input('what is the green letter?; ')
      print()
      time.sleep(2)
      l1 = input('where is ' + s1 + '?; ')
      print()
      time.sleep(2)
      yl = input('what letters are yellow?; ')
      print()
      time.sleep
      dw = input('what letters are grey?; ')
      print()
      cq += 1
  
  print(&quot;Searching.&quot;)
  time.sleep(1)
  print(&quot;Searching..&quot;)
  time.sleep(1)
  print(&quot;Searching...&quot;)
  time.sleep(1)
  print()
  #letters that can't be used
  deadletters = 'm'
  
  
  list1 = [w for w in list0 if (any(set(w) &amp; set(yl)))]
  #sorts out words with dead letters
  list2 = [w for w in list1 if not (any(set(w) &amp; set(dw)))]
  
  #only lets words with &quot;a___y&quot; through
  found = [w for w in list2 if (w[int(l1)] == s1)]
  
  print()
  print(found)
  </code></pre>
  <p>Having Fun Playing Wordle...
  don't worry about me...
  i need more words cause i have too much code...
  :)...</p>
  <p><a href="https://i.stack.imgur.com/5EUFo.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/5EUFo.png" alt="enter image description here" /></a></p>