how to split character in python before specific character code example Example: python split string in characters s = "foobar" list(s) ['f', 'o', 'o', 'b', 'a', 'r']