Can’t use ‘1’ backreference to capture-group in a function call in re.sub() repr expression
I have a string S = '02143'
and a list A = ['a','b','c','d','e']
. I want to replace all those digits in āSā with their corresponding element in list A
.