how to get each character in a string in python code example Example: python string to char array >>> s = "foobar" >>> list(s) ['f', 'o', 'o', 'b', 'a', 'r']