Reputation: 101
I want to take a binary string as an input (01110111) and convert the input to a list like this [0,1,1,1,0,1,1,1] in Python. Can you help me how to do it?
TIA!
Upvotes: 1
Views: 382
Reputation: 23
Use list()
to split a word into a list of letters.
input = "01110111"
list_of_letters = list(input)
Upvotes: 2