Append a string to char array using fromstring method

suggest change

You are able to append a string to a character array using fromstring(). As written, this sample fails: 'c' is not a Python 3 typecode, and fromstring has been removed. The replacement is frombytes.

my_char_array = array('c', ['g','e','e','k'])
my_char_array.fromstring("stuff")
print(my_char_array)
#array('c', 'geekstuff')

Feedback about page:

Feedback:
Optional: your email if you want me to get back to you:



Table Of Contents