title: What does the "x for x in" syntax mean?
body: <p>What actually happens when this code is executed:</p>
  
  <pre><code>text = "word1anotherword23nextone456lastone333"
  numbers = [x for x in text if x.isdigit()]
  print(numbers)
  </code></pre>
  
  <p>I understand, that <code>[]</code> makes a list, <code>.isdigit()</code> checks for True or False if an element of string (text) is a number. However I am unsure about other steps, especially: what does that "x" do in front of for loop?</p>
  
  <p>I know what the output is (below), but how is it done?</p>
  
  <pre><code>Output: ['1', '2', '3', '4', '5', '6', '3', '3', '3']
  </code></pre>