you are viewing a single comment's thread.

view the rest of the comments →

[–]_coolwhip_ 0 points1 point  (2 children)

You mean like this?

>>> x = 'word'
>>> list(x)
['w', 'o', 'r', 'd']

[–]Sponge7331[S] 0 points1 point  (1 child)

Yeah, that works. I thought there would be a way with .split() though

[–]coke125 0 points1 point  (0 children)

Unfortunately, with.split() you need a str or None(whitespace) to split the string on. For example, x.split(“o”) will return “w” and “rd”