import reline = 'blah < b la a ah > blah'line = re.sub(r"\s*(?=[^<>]*>)", "", line)print(line)
Standard input is empty
blah <blaaah> blah
The brand new service which powers Ideone!
Widget for compiling and running the source code in a web browser!