-2

I am using python (version 2.7) and I have a variable called characters ('abc123'). I would like to be able to split it so that I have a list of the characters in the variable (['a', 'b', 'c', '1', '2', '3']). Does anyone know how to do this?

Cœur
  • 34,719
  • 24
  • 185
  • 251
OscarPi
  • 3
  • 1
  • 2

1 Answers1

0
s = 'abc123'

>>> list(s)
['a', 'b', 'c', '1', '2', '3']
Cory Kramer
  • 107,498
  • 14
  • 145
  • 201