/[.*?] /g [A] this is a song [D] [Am] i am [Adim] Am [f] // input this is a song i am Am // output
import re substring = re.sub("[([].*?[)]]", "", string)