1

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!

1
  • 4
    l = list(map(int, '01110111')) Commented Oct 6, 2022 at 18:58

1 Answer 1

2

Use list() to split a word into a list of letters.

input = "01110111"
list_of_letters = list(input)
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.