To join a array to string in Python you can use the following snippet.

Sample Python

def JoinArray(input, delimiter, appendToEnd):
	delimiter = ';'
	joinedString = delimiter.join(input)
	if appendToEnd:
		joinedString = joinedString + delimiter
		return joinedString
		return joinedString

list = ['This', 'is', 'a', 'Test','!']
print JoinArray(list, ';', False)

2 thought on “How to join a array to string in Python”

Leave a Reply