python char array to string code example
Example 1: how to join a list of characters in python
>>> a = ['a', 'b', 'c', 'd']
>>> ''.join(a)
'abcd'
Example 2: python string to char array
>>> s = "foobar"
>>> list(s)
['f', 'o', 'o', 'b', 'a', 'r']
Example 3: char array to string
String string = String.valueOf(a);
Example 4: how to save string characters into char array or list in python
fd = open(filename, 'rU')
chars = []
for line in fd:
chars.extend(line)