txt='this is a paragraph with in between[1> and then there are cases ... where the number ranges from 1-100[99>. and there are many other lines in the txt files with such tags [3>'
txt.replace("(]+>)",'')
replace只支持固定替换,不支持正则,可以使用re
import re
txt='this is a paragraph with in between[1> and then there are cases ... where the number ranges from 1-100[99>. and there are many other lines in the txt files with such tags [3>'
out = re.sub("(]+>)", '', txt)
print out