title: How to convert this using list comprehension?
body: <pre><code>l = []
  for i in range(11):
      l.append(1)
      for j in range(i):
          l.append(0)
  
  print(l)
  </code></pre>
  <p>The output follows a <code>(1, 1, 0, 1, 0, 0, 1, 0, 0, 0, ...)</code> pattern. I do not know however how to convert nested-for loops using list comprehension.</p>