I have a list of string elements where list = [X, Y, Z]
.
I want to update the elements in the list such that it becomes [X_AAA, X_BBB, X_CCC, Y_AAA, Y_BBB, Y_CCC, Z_AAA, Z_BBB, Z_CCC]
. Essentially, I'm appending AAA, BBB and CCC to every element in this list of strings.
What is the most efficient way to do this?
Thank you!
.