G'day everyone!
I would like to design typing tutor exercises for Afrikaans (and other
languages possibly). This is for a GPL project. For this, I need a
script that can extract words from a long list of words, based on which
letters those words contain, and write then write output to a file.
#---Input data
#List of words; every word or sentence on one line
#If from file: WORDS = open(fileName).readlines()
WORDS = \
Afrikaans
Anna
Bread
red
word
bored
python.split('\n')
#---Main program
import re
PATTERN = ['[^(%s)]+','[%s]+']
FILENAME= ['not_%s.txt','%s.txt']
def
Throw [EMAIL PROTECTED] writes:
G'day everyone!
I would like to design typing tutor exercises for Afrikaans (and other
languages possibly). This is for a GPL project. For this, I need a
script that can extract words from a long list of words, based on which
letters those words contain,
Throw [EMAIL PROTECTED] wrote in comp.lang.perl.misc:
G'day everyone!
I would like to design typing tutor exercises for Afrikaans (and other
languages possibly). This is for a GPL project. For this, I need a
script that can extract words from a long list of words, based on which
letters
reinstated the context that was omitted by SPE
Throw wrote:
I must be able to extract words which contain only
certain letters (they need not contain all of those letters,
but they may not contain any other letters).
SPE - Stani's Python Editor wrote:
#---Input data
#List of words;