title: Python : How to refer itself in the list comprehension?
body: <pre><code>lsit_a = [2, 4, 3, 6, 3, 8, 5]
  </code></pre>
  
  <p>list comprehension is very useful.</p>
  
  <pre><code>list_b = [a**2 for a in list_a]
  </code></pre>
  
  <p>I want to know how to write a self-reference in the python list comprehension.</p>
  
  <p>for example -</p>
  
  <pre><code>list_c = [a**2 if i == 0 else a*2 + (itself[i-1]) for i, a in enumurate(list_a)]
  </code></pre>
  
  <p>how to write the part of <code>itself[i-1]</code>?</p>
  
  <h1>ADD</h1>
  
  <p>Sorry, my explain is bad...</p>
  
  <p>I want to get the list by a high-speed way.</p>
  
  <h2>input list</h2>
  
  <p>list_a = [0,0,1,0,0,0,1,0,0,1,0]</p>
  
  <h2>output list</h2>
  
  <p>list_c = [0, 0, 1, 0.9, 0.8, 0.7, 1, 0.9, 0.8, 1, 0.9]</p>
  
  <p>like a saw tooth list.</p>