Sort List

Chris... sca at isogmbh.de
Fri Oct 15 07:11:34 EDT 1999


"M.-A. Lemburg" wrote:

> sorot at my-deja.com wrote:
> >
> > I'm the newbie of Python. I wonder that is there any function for
> > sorting list alphabetically? And is there any function to get the date
> > and time of OS?
>
> a. list = [1,3,4]
>    list.sort()

  But avoid the variable name 'list', since list is a predefined function
for constructing lists and it cannot be used after the above definition.
>>> list('abc')
['a', 'b', 'c']

bye
  Chris...





More information about the Python-list mailing list