title: How to make list of lists, where you take the square and cube of each even number?
body: <p>I would like to make a list of lists after squaring and cubing each even number.</p>
  <p>Below is my code i have thus far:</p>
  <pre><code>def sq_cube(numbers):
      ls1 = []
      for i in numbers:
          if i%2 == 0:
              ls1.append(i)
          else:
              pass
  
      ls2square = [x**2 for x in ls1]
      ls3cube = [x**3 for x in ls1]
  
      ls4all = list(ls2square +ls3cube)
  return ls4all
  
  
  RUN: sq_cube([1,2,3,4,6])
  OUTPUT:[4, 16, 36, 8, 64, 216]
  
  I would love my OUTPUT to be: [[4, 8], [16, 64], [36, 216]]
  </code></pre>
  <p>ls1: Here I sorted the list 1,2,3,4,6 into even numbers.</p>
  <p>ls2square: Squared the even number in ls1.</p>
  <p>ls3cube: Cubed the even numbers in ls1.</p>
  <p>As you can see in my OUTPUT it gives both lists but it does not give each even
  number its separate list where that even number was squared and cubed.</p>