How to concatenate strings into a list?

Asked

Viewed 1,654 times

1

If I have a list of string-like objects and want to concatenate all these items, how do I do that? For example:

row1 = ['___', '___', '___']

I would like to print: '___|___|___'

I managed to do so, but it is not very practical: line1 = row1[0] + "|" + row1[1] + "|" + row1[2]

1 answer

2


Browser other questions tagged

You are not signed in. Login or sign up in order to post.