title: Better way to call a chain of functions in python?
body: <p>I have a chain of operations which needs to occur one after the other and each depends on the previous function's output.</p>
  
  <p>Like this:</p>
  
  <pre><code>out1 = function1(initial_input)
  out2 = function2(out1)
  out3 = function3(out2)
  out4 = function4(out3)
  </code></pre>
  
  <p>and so on about 10 times. It looks a little ugly in the code.</p>
  
  <p>What is the best way to write it? Is there someway to handle it using some functional programming magic? Is there a better way to call and execute this function chain?</p>