title: Triple nested list comprahension python. Is it possible?
body: <p>I'm practicing nested lists comprehension and i encountered some problems i cannot solve nor find any solutions online :&lt;</p>
  
  <pre><code>nested_lista = [[2,1,2,3],[1,2,3,4],[4,4,[16,1,3]]]
  </code></pre>
  
  <p>Using loops its easy to iterate through every layer of this nested list</p>
  
  <pre><code>def nested_loops():
      for x in nested_lista:
  
          for y in x:
              print(y)
  
              if type(y) == list:
  
                  for z in y:
                      print(z)
  </code></pre>
  
  <p>Output: </p>
  
  <pre><code>2
  1
  2
  3
  1
  2
  3
  4
  4
  4
  [16, 1, 3]
  16
  1
  3
  </code></pre>
  
  <p>Now im trying to achieve similar output with nested list comprehension but it's not working no matter what i try ;/</p>
  
  <p>Here's what I've come up with:</p>
  
  <pre><code>[[[print(y) for y in z if type(z)==list]print(z) for z in x]for x in nested_lista]
  </code></pre>
  
  <p>or at least i tried to iterate through last layer but it also doesnt work</p>
  
  <pre><code>[[[print(y) for y in z if type(z)==list] for z in x]for x in nested_lista]
  </code></pre>
  
  <p>Is it possible to solve this or i should give up?</p>