In Python 2.7 I can create an array of characters like so:
#Python 2.7 - works as expected
from array import array
x = array('c', 'test')
But in Python 3 'c' is no longer an available typecode. If I want an array of characters, what should I do? The 'u' type is being removed as well.
#Python 3 - raises an error
from array import array
x = array('c', 'test')
TypeError: cannot use a str to initialize an array with typecode 'c'