Simple Script to Combine/Seperate Lines of Text

Erik Max Francis max at alcyone.com
Sun Jun 8 23:00:50 EDT 2003


Ben Minton wrote:

> I can write this in a flow diagram but don't understand strings enough
> to
> do this.

Iterate over the strings, apply your algorithm, and join the result back
together into a string.  Probably something like

	''.join(map(yourFunction, string1, string2))

>From briefly looking at your string examples, I couldn't tell what
algorithm you wanted yourFunction to implement (but then I didn't try
very hard), so that's up to you.

-- 
   Erik Max Francis && max at alcyone.com && http://www.alcyone.com/max/
 __ San Jose, CA, USA && 37 20 N 121 53 W && &tSftDotIotE
/  \ What a crime to waste [youth] on children.
\__/  George Bernard Shaw




More information about the Python-list mailing list