I would like to have the 2D array show only 2 letters per inner array. My syntax is the same why are some arrays containing 2 while others contain three?
Think about this logically. You are first replacing every “A” with “A,T”. And then you are replacing every “T” with “T,A”. Do you see that you added a “T” in the first replace and now it is going to be replaced by “T,A” in the second replace? So a single “A” is going to end up as:
"A" -> "A,T" // after first replace
"A,T" -> "A,T,A" // after second replace