[Tutor] iterate problem

alan.gauld@bt.com alan.gauld@bt.com
Tue, 18 Jul 2000 18:10:43 +0100

> trying to write a simple script that removes the >>>'s from 
> the beginning of lines in a text file 

Sounds like a job for reg expressions to me.

the regexp will be something like:

>[> ]+

which means a '>' followed by one or more '>' or spaces.

The sub function/method in the re module should replace 
that with an empty string.

Alan G.