title: Tuples in python to 3D matrix
body: <p>I have a list of lists in python that contains the score of users in a game with different courses and levels. My tuple (users, courses, levels, scores). I ve got 20 users 4 courses and 10 levels. What I want is to create a 3D matrix which will have as dimensions users-courses-levels and as a value user score.  My tuples are as of the following:</p>
  
  <pre><code>(110, u'Math', 1, 5)
  (110, u'Sports', 1,  5)
  (110, u'Geography', 1, 10)
  (112, u'History', 1,  9)
  (112, u'History', 2,  10)
  ... ... ... ... ... ... ..
  </code></pre>
  
  <p>How can I create the 3D matrix (putting zero in the fields that I dont have data)? </p>