home ~ projects ~ socials

Split A String Into Characters In Python

base = "abcdef"
tokens = list(base)

for token in tokens:
  print(token)
Output:
a
b
c
d
e
f
-- end of line --

References