Alex Rivera | Logout

How to create a list with the characters of a string?

Asked 2011-03-31T14:41:08.527
14

Is it possible to transform a string into a list, like this:

"5+6"

into

["5", "+", "6"]
Edit
Report

1 Answer

21
list('5+6')

returns

['5', '+', '6']
answered 2011-03-31T14:42:24.463

Your Answer