-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
  • 37,241
  • 25
  • 195
  • 267
OscarPi
  • 3
  • 1
  • 2

1 Answers1

0
s = 'abc123'

>>> list(s)
['a', 'b', 'c', '1', '2', '3']
Cory Kramer
  • 114,268
  • 16
  • 167
  • 218