Hi,
I just had a tryst with python.
I was wondering if python is good enough to do this kind of job -- for it
has extensive support of string and pattern matching, ordering and list
handling.
There are 'n' itemsets, the size of n is unknown. The program can count
itself while scanning. Each of the n itemset is of the form key: value
{key1: value1, key2:value2, key3, value3, key4: value4 .....}
Is it possible to order this itemset in an increasing order of key: value
with respect to keys. For example: if
key4>key2>key3>key1
then the resulting ordering should be in such a way:
key4:value4, key2: value2,key3:value3>key1: value1
I plan to do this by storing this whole set of itemset in a vector or map.
Lets say vector v={key1:value1, key2: value2, key3: value3,key4:value4}
Now I wish to apply the sorting over this vector v, such that I have the
entries in the increasing order with respect to keys in v again.
Can some one point to me how to achieve this with python?
A snippet.....
Thanks,
Shalen
__________________________________________________ _______________
Protect your PC from viruses. Get in the experts.
http://www.msn.co.in/pcsafety/ Click here now!