title: Execute multiple lines with python in one line for loop
body: <p>I have a loop that appends to new list named <code>list1</code> and it is working, but how can I add something more like <code>print(x)</code> or anything useful to <code>list1.append(...)</code>?</p>
  
  <pre><code>word="abcdefg"
  list1=[]
  [list1.append(word[i]) for i in range(len(word))]
  print(list1)
  </code></pre>
  
  <p>I've tried using <code>list1.append(word[i]);print("working")</code> and with <code>,</code></p>