in reply to Re: How do I put bracket on substring(s) of a string?
in thread How do I put bracket on substring(s) of a string?

When I print the string returned by each of your put_bracket calls, the output does not match the required output for 3 and 4:
CCC[ATCTG]TCCTT[ATTTG]CTG AC[CCATC]TGTCCTTGGCCAT [CCACC]A[GCACC]TGTC C[CCAAC]ACCTGCTGCCT