Say I have a for loop that iterates through the characters in a string one by one.
Ex:
string_x = "abc"
for i in range (0, len(string_x))
data = str(string_x[i])
print(data)
The output gives me a, b, c one by one.
Now I want to group this back into a different string after I scramble it character by character. I already figured out how to scramble it, but I can't just append it back to a string inside the loop because it overrides the string value each iteration and only ends up with one character such as 'b'. I want the for loop to create a new string named string_y that can incrementally have new characters appended to it without overriding the whole string every loop iteration. Any ideas?