Convert array to string using tostring method
suggest changetostring() converts the array to a string. As written, this sample fails: 'c' is not a Python 3 typecode, and tostring has been removed. The replacement is tobytes, which returns bytes, not a text string.
my_char_array = array('c', ['g','e','e','k'])
# array('c', 'geek')
print(my_char_array.tostring())
# geek
Found a mistake? Have a question or improvement idea?
Let me know.
Table Of Contents