"John" <[EMAIL PROTECTED]> writes: > I am coding a radix sort in python and I think that Python's dictionary may > be a choice for bucket. > > The only problem is that dictionary is a mapping without order. But I just > found that if the keys are numeric, the keys themselves are ordered in the > dictionary. > > part of my code is like this: > radix={} > for i in range(256): > radix[i]=[]
I wonder why nobody has suggested the use of a list: redix = [[] for i in range(256)] Matthias -- http://mail.python.org/mailman/listinfo/python-list