The split(',')
method in Python will return a list. Join them together using whatever separator you desire. If new_line.split(',')
gives you something like ['Column1','Column2','Column3']
etc. then try
' | '.join(new_line.split(','))
This would give you something like Column1 | Column2 | Column3
.
The syntax is a little different than most ppl are used to from other languages, but the join method in Python must be called on the separator, with the target list passed as the parameter.