On 22/01/16 00:00, Steven D'Aprano wrote: > Also, you have a problem -- what happens if the incomplete postcode is > missing the first digit? (I suppose for that case, you just have to do a > slow linear search.)
Which is why a different solution may be better suited. What about an in-memory SQLite table? Then you can use a LIKE based select and let the library do the hard work. Just a thought. -- Alan G Author of the Learn to Program web site http://www.alan-g.me.uk/ http://www.amazon.com/author/alan_gauld Follow my photo-blog on Flickr at: http://www.flickr.com/photos/alangauldphotos _______________________________________________ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: https://mail.python.org/mailman/listinfo/tutor