title: How to sort array in python?
body: <p>This is my code,</p>
  
  <pre><code>from array import array
  def genId():
      ma={'0':1001,'1':1002,'3':1003,'4':1004,'5':1005,'6':1006,'7':1007}
      print ma
      n=array('i')
      for j in ma:
          n.append(ma[j])
      print n
  if __name__=="__main__":
    genId()
  </code></pre>
  
  <p>I want to sort the values of n. How to do it?
  and this is the output i'm getting,</p>
  
  <pre><code>{'1': 1002, '0': 1001, '3': 1003, '5': 1005, '4': 1004, '7': 1007, '6': 1006}
  array('i', [1002, 1001, 1003, 1005, 1004, 1007, 1006])
  </code></pre>
  
  <p>please tell me how to sort these array values?
  thanks in advance..</p>