title: Which is more preferable to use: lambda functions or nested functions ('def')?
body: <p>I mostly use lambda functions but sometimes use nested functions that seem to provide the same behavior.</p>
  <p>Here are some trivial examples where they functionally do the same thing if either were found within another function:</p>
  <p><strong>Lambda function</strong></p>
  <pre><code>&gt;&gt;&gt; a = lambda x : 1 + x
  &gt;&gt;&gt; a(5)
  6
  </code></pre>
  <p><strong>Nested function</strong></p>
  <pre><code>&gt;&gt;&gt; def b(x): return 1 + x
  
  &gt;&gt;&gt; b(5)
  6
  </code></pre>
  <p>Are there advantages to using one over the other? (Performance? Readability? Limitations? Consistency? etc.)</p>
  <p>Does it even matter? If it doesn't then does that violate the Pythonic principle:</p>
  <blockquote>
  <p><a href="https://www.python.org/dev/peps/pep-0020/" rel="noreferrer">There should be one-- and preferably only one --obvious way to do it.</a>.</p>
  </blockquote>