On 6/12/12 9:56 AM, tvn wrote:
Does Sage has some data structure like set that preserve the order of
the elements ? For example , I want set([1,2,3,1) to always return 1,2,3
. In addition to set(), I also need operations of set like difference,
intersection ,etc that guarantees some specific orders. Thanks,


set is a python datatype, so one thing to do is look for 'python ordered set'. Indeed, one of the first links was a stack overflow question that pointed to this:

http://code.activestate.com/recipes/576694/

Thanks,

Jason



--
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/sage-support
URL: http://www.sagemath.org

Reply via email to