# Example text input as an array
text_array = []
# Function to replace ":" with "|"
def replace_colon_with_pipe(text):
return text.replace(":", "|")
# Applying the function to each element in the input array
output_array = [replace_colon_with_pipe(text) for text in text_array]
print(output_array)
# Output: ['text1|text2', 'text3|text4', 'text5|text6']