title: Accept 3 dictionary inputs with keys Name, age and total marks. print them in a table in ascending order of marks
body: <p>I want to write a program to store Information of 3 students in to a dictionary with keys Name, age and total marks. Accept inputs from keyboard and print them as a table in ascending order of marks
  Here is the code i have written.</p>
  
  <pre><code>import ast
  from collections import OrderedDict
  d={}
  for i in range(3): 
    a = raw_input("Please enter details of student %d: " %(i+1))
    d[i] = ast.literal_eval(a)
  print "\nname\tage\tmarks\n"
  d_ascending = sorted(d.items(), key=lambda t: t[1]['marks'])
  for i in range(3):
      print "%s\t%d\t%d" % (d_ascending[i][1]['name'],d_ascending[i][1]['age'],d_ascending[i][1]['marks']) 
  </code></pre>
  
  <p>On giving 3 input as</p>
  
  <pre><code>{"name":"X","age":20,"marks":200}
  {"name":"Y","age":21,"marks":900}
  {"name":"Z","age":20,"marks":700}
  </code></pre>
  
  <p>output is :</p>
  
  <pre><code>name    age     marks
  
  X       20      200
  Z       20      700
  Y       21      900
  </code></pre>
  
  <p>I want the table as :</p>
  
  <pre><code>+--------+--------+--------+
  |  name  |  age   |  marks |
  +--------+--------+--------+
  | X      | 20     | 200    |
  | Z      | 20     | 700    |
  | Y      | 21     | 900    |
  +--------+--------+--------+
  </code></pre>
  
  <p>I need this type of table. Also I would like to know whether there are any other easy ways to do this program. Just to know more possibilities to learn.</p>