title: How to output a 2d list from list and integers
body: <p>I'm trying to write a function that takes an input list and two integers as parameters, the function should then return a two-dimensional list with the rows and columns of the list being specified by the two input integers. e.g. if the input list is <code>[8, 2, 9, 4, 1, 6, 7, 8, 7, 10]</code> and the two integers are 2 and 3 then the function should return <code>[[8, 2, 9],[4, 1, 6]]</code></p>
  
  <pre><code>def one_to_2D(some_list, r, c):
      output = []
  
      for a in range(0, r):
          my_list = some_list[0:c]
          some_list.reverse()
          for k in range(0,r):
              some_list.pop()
          some_list.reverse()
          output.append(my_list)
  
      return output
  
  some_list = [8, 2, 9, 4, 1, 6, 7, 8, 7, 10]
  print(one_to_2D(some_list, 2, 3))
  </code></pre>