title: Recursion to print the 1st level items of nested list
body: <p>I have this problem
  E1). L is a list whose elements may be hidden. A hidden element is one that is stored inside one or more lists in the list L. Design a recursive function that displays all the &quot;visible elements&quot; of L</p>
  <p>for example For L = [1,[2],[[3]],[4,5],6], the expected result is [1,2,3,4,5,6].
  In this example the numbers 1 and 6 are visible and the elements 2, 3, 4 and 5 are hidden.</p>
  <p>im learning recursion in python, i tried to find a solution for this problem but i was just able to do this:</p>
  <pre><code>l = [1,2,4,5,6]
  def simple_vista(l):
    if l==[]:
      return 0
    else:
      if isinstance(l[0], list):
        pass
      else:
        l[0] + simple_vista(l[1:])
  
  print(&quot;los numeros a simple vista son: &quot;, simple_vista(l))
  </code></pre>
  <p>The idea that i have to solve the problem:</p>
  <p>My idea is to check if the l[0] is a iterable type item (a list) and if is it, ignore it and the same with the rest of elements of the list (l[1:]), if an element is not a iterable type item, save it and at the end, show that numbers.</p>
  <p>Note: recursion means that im not able to use cicles for and while in order to answer the problem</p>