Delete characters upto and including ']'
a="[12] hi how are you [1]"
b="[13][14] hello"
expected output :
a="hi how are you [1]"
b=" hello"
You can use regular expression to achieve this
import re
txt = "[12] hi how are you"
x = re.sub("\[[0-9]+\]\s*", "", txt)
print(x)