从文本字符串中删除2个字符之间的字符

jer*_*use 10 python regex

我有文字字符串,如:

"abcd[e]yth[ac]ytwec"
Run Code Online (Sandbox Code Playgroud)

我需要

"abcdythytwec"
Run Code Online (Sandbox Code Playgroud)

在python中使用正则表达式或其他方法最简单的方法是什么?我正在使用.split('[')繁琐的方法.

NPE*_*NPE 16

In [11]: re.sub(r'\[.*?\]', '', 'abcd[e]yth[ac]ytwec')
Out[11]: 'abcdythytwec'
Run Code Online (Sandbox Code Playgroud)