[sage-support] Re: sort a list

2009-07-15 Thread Minh Nguyen
Hi Mikie, On Thu, Jul 16, 2009 at 5:14 AM, Mikiethephantom6...@hotmail.com wrote: How does one sort a list in Sage? I have tried L1=[56,2,4,10] Sort_ = L1.sort() and nothing is produced. Try this: -- | Sage Version

[sage-support] Re: sort a list

2009-07-15 Thread Justin C. Walker
On Jul 15, 2009, at 12:14 , Mikie wrote: How does one sort a list in Sage? I have tried L1=[56,2,4,10] Sort_ = L1.sort() and nothing is produced. As the saying goes, RTFM :-} sage: L1=[56,2,4,10] sage: L1.sort? Type: builtin_function_or_method Base Class: type

[sage-support] Re: sort a list

2009-07-15 Thread Carlos Córdoba
This is not about RTFM, because L1.sort() doesn't produce any result. It just modifies the original list in place. I think that Mikie wants to assign the sorted list to another list. In that case what you need is the sorted command: sage: L1 = [56,2,4,10] sage: sort_L1 = sorted(L1) sage: sort_L1

[sage-support] Re: sort a list

2009-07-15 Thread Mikie
Carlos, just what I needed. I have looked in scipy, but no Quartiles. On Jul 15, 1:26 pm, Carlos Córdoba ccordob...@gmail.com wrote: This is not about RTFM, because L1.sort() doesn't produce any result. It just modifies the original list in place. I think that Mikie wants to assign the

[sage-support] Re: sort a list

2009-07-15 Thread Simon King
Hi! On 15 Jul., 21:26, Carlos Córdoba ccordob...@gmail.com wrote: This is not about RTFM, because L1.sort() doesn't produce any result. It just modifies the original list in place. ... and this is precisely what the manual tells you. However, you are right: I think that Mikie wants to