title: python loop of radix sort
body: <p>i just write another radix sort program, here is my code:</p>
  
  <pre><code>#----------radix sort----------
  def set_output():
      output_list = []
      for i in range (10):
          output_list.append(queue())
      return output_list
  
  def set_radix(lists):
      output_list = set_output()
      for queue in lists:
          for num in queue:
              a = num[2]
              output_list[int(a)].add(num)
      return output_list
  
  def sec_radix(input_list, i):
      output_list = set_output()
      for queue in input_list:
          while len(queue) &gt; 0:
              num = queue.after()
              a = num[i]
              output_list[int(a)].add(num)
      return output_list
  
  def done_radix(num_list):
      return sec_radix(sec_radix(set_radix(num_list), 1), 0)
  </code></pre>
  
  <p>the python shell keeps telling me that "IndexError: string index out of range", my string of numbers is all right. i think something wrong with my <code>def set_radix()</code>function, but i can't find out where is it?</p>