Another method for searching strings the re module

The re module also does string searching but in a far more flexible manner, using regular expressions. Rather than searching for a single specified substring, an re search can look for a string pattern. You could look for substrings that consist entirely of digits, for example. Why am I mentioning this, when re is discussed fully later In my experience, many uses of basic string searches are inappropriate. You'd benefit from a more powerful searching mechanism but aren't aware that one exists,...

Summary of list operations

You can see that lists are very powerful data structures, with possibilities that go far beyond plain old arrays. List operations are so important in Python programming that it's worth laying them out for easy reference, as shown in table 5.1. Adds a single element to the end of a list Inserts a new element at a given position in the list Searches for and removes a given value from a list Returns the smallest element in a list Returns the largest element in a list Returns the position of a...

Using the web server gateway interface

In the early days of Python web frameworks, there was little standardization of how web applications interacted with web servers. Consequently, the choice of a web framework often limited the possible web servers you could use and made migration from one to the other difficult. The WSGI (whiz-ghee), or web server gateway interface, specification was created to provide a standard for the interaction of web server and applications, so that it would be easier to use a web application and framework...

Alternatives to Tkinter

It isn't particularly fast and isn't a good candidate for games or for image-manipulation programs. Its high-level approach means that particularly unusual or specialized user interfaces may be difficult to implement. Or, you may not have the time to learn Tkinter. Fortunately, alternatives are available. Three cross-platform windowing GUI libraries stand out, being available for at least Windows, Mac OS X, and Linux UNIX. The first is the Qt package, which...