Is there a function similar to toCharArray(c#) in python? I know there aren't chars in python, but is there a similar data type? Or is there a way to break a string up into smaller, one digit strings?
Asked
Active
Viewed 5,486 times
0
-
Simple `list(your_string_here)`. – Frontear Jan 09 '19 at 02:15
1 Answers
0
Assuming by char array, you mean a set of integers (as opposed to one-character strings), then you would do the following:
list(mystring.encode())
(for python3)

mdurant
- 27,272
- 5
- 45
- 74