Chapter 5. Searching and Sorting


    Introduction

    Recipe 5.1.  Sorting a Dictionary

    Recipe 5.2.  Sorting a List of Strings Case-Insensitively

    Recipe 5.3.  Sorting a List of Objects by an Attribute of the Objects

    Recipe 5.4.  Sorting Keys or Indices Basedon the Corresponding Values

    Recipe 5.5.  Sorting Strings with Embedded Numbers

    Recipe 5.6.  Processing All of a List's Items in Random Order

    Recipe 5.7.  Keeping a Sequence Ordered as Items Are Added

    Recipe 5.8.  Getting the First Few Smallest Items of a Sequence

    Recipe 5.9.  Looking for Items in a Sorted Sequence

    Recipe 5.10.  Selecting the nth Smallest Element of a Sequence

    Recipe 5.11.  Showing off quicksort in Three Lines

    Recipe 5.12.  Performing Frequent Membership Tests on a Sequence

    Recipe 5.13.  Finding Subsequences

    Recipe 5.14.  Enriching the Dictionary Type with Ratings Functionality

    Recipe 5.15.  Sorting Names and Separating Them by Initials



Python Cookbook
Python Cookbook
ISBN: 0596007973
EAN: 2147483647
Year: 2004
Pages: 420

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net