Path: csiph.com!usenet.pasdenom.info!aioe.org!news.stack.nl!newsfeed.xs4all.nl!newsfeed2.news.xs4all.nl!xs4all!post.news.xs4all.nl!not-for-mail Return-Path: X-Original-To: python-list@python.org Delivered-To: python-list@mail.python.org X-Spam-Status: OK 0.013 X-Spam-Evidence: '*H*': 0.97; '*S*': 0.00; 'example:': 0.03; 'received:80.91': 0.09; 'received:80.91.229': 0.09; 'received:gmane.org': 0.09; 'received:list': 0.09; '"o"': 0.16; 'adjacent': 0.16; 'letters.': 0.16; 'message-id:@4ax.com': 0.16; 'need:': 0.16; 'received:80.91.229.3': 0.16; 'received:plane.gmane.org': 0.16; 'supplied': 0.16; 'entered': 0.20; 'print': 0.22; 'url:home': 0.24; 'mon,': 0.24; 'header:X -Complaints-To:1': 0.27; 'words': 0.29; 'dec': 0.30; 'txt': 0.31; 'file': 0.32; 'but': 0.35; 'there': 0.35; 'sequence': 0.36; 'words,': 0.36; 'charset:us-ascii': 0.36; 'to:addr:python-list': 0.38; 'to:addr:python.org': 0.39; 'received:org': 0.40; 'how': 0.40; 'letters': 0.60; 'simply': 0.61; 'containing': 0.69; 'limit': 0.70; '(is': 0.84; 'received:108': 0.93; '2013': 0.98 X-Injected-Via-Gmane: http://gmane.org/ To: python-list@python.org From: Dennis Lee Bieber Subject: Re: Dictionary Date: Mon, 30 Dec 2013 15:00:07 -0500 Organization: IISS Elusive Unicorn References: Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Gmane-NNTP-Posting-Host: adsl-108-79-217-221.dsl.klmzmi.sbcglobal.net X-Newsreader: Forte Agent 6.00/32.1186 X-No-Archive: YES X-BeenThere: python-list@python.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: General discussion list for the Python programming language List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Newsgroups: comp.lang.python Message-ID: Lines: 28 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1388433617 news.xs4all.nl 2884 [2001:888:2000:d::a6]:57933 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:62899 On Mon, 30 Dec 2013 18:38:20 +0000, Bischoop declaimed the following: >I have a txt file with some words, and need simply program that will >print me words containing provided letters. > >For example: >Type the letters: > (I type: g,m,o) >open the dictionary.txt > check words containing:g,m,o in dictionary.txt >if there are words containing: ["g", "m", "o" ] > print words with g,m,o Vague requirement... Do you need: 1 any word containing any single letter 2 any word containing all supplied letters (is there a limit on how many letters?) 3 any word containing the supplied letters in the entered order, but not necessarily adjacent to each other 4 any word containing the supplied letters in adjacent sequence 5 any word that begins with the supplied sequence of letters -- Wulfraed Dennis Lee Bieber AF6VN wlfraed@ix.netcom.com HTTP://wlfraed.home.netcom.com/