The below string replace code prints "XXaXXbXXcXX1XX2XX3XX". I know there is a reason behind it but having hard time finding it. Can someone please explain why?
if __name__ == '__main__':
match = ""
replace = "XX"
strr = "abc123"
print strr.replace(match, replace)