[Tutor] R?p. : Sorting Data in Databases

Ken G. beachkid at insightbb.com
Tue Nov 24 06:22:27 CET 2009


Albert Sweigart wrote:
> Ken,
>
> You should probably use the sorting functionality that your DBMS
> provides. However, if you have a list of strings that end with a new
> line and start with an apostrophe, you can use list comprehensions to
> remove them:
>
> newlist = [x[1:-1] for x in newlist]
>
> You can look at the following links to find out more about list
> comprehensions here:
>
> http://www.secnetix.de/olli/Python/list_comprehensions.hawk
> http://www.network-theory.co.uk/docs/pytut/ListComprehensions.html
>
> -Al
> You should check out my free beginner's Python book here:
> http://inventwithpython.com
>
>   
>
Thanks for the tip.  I really don't have a DBMS here.  It is just 
something I don't use.  I will look into it.

Again, thanks.  I also appreciate the links.

Ken


More information about the Tutor mailing list