[Tutor] language aid

Owain Clarke simbobo at cooptel.net
Thu Feb 4 11:43:26 CET 2010

Hello, all.

I am a newcomer to Python, and I know that I have much learning to do 
before I implement my idea, but I am working on the beginnings of a 
vocabulary building program. This is how I am catching new words at the 

def newVocab(x,y):
Add new word pair, English word second.
Words to be separated by ':' """

I can follow this with

french = []

The idea is that eventually the user would be prompted to enter a french 
(or whatever) word, and then to enter its English equivalent. The code 
would then be responsible for adding the ":" storing all the words in a 
list which would be written to a file, and recovering them as needed. 
Although i don't know how at this point, I assume I can search the part 
of the string before the colon or after, and thus set up vocabulary tests.

My question is, that if I proceed like this I will end up with a single 
list of potentially several hundred strings of the form 
"frword:engword". In terms of performance, is this a reasonable way to 
do it, or will the program increasingly slow down?

All suggestions appreciated

Owain Clarke

More information about the Tutor mailing list