arr

How to split a list that has ONLY ONE integer value in Python?

How to split a list that has ONLY ONE integer value in Python? Question: I want to split a value in a list and make it two values. arr = [10] The array should turn in to: arr = [1,0] Asked By: User || Source Answers: Use list comprehension with two iterations: >>> [int(x) if …

Total answers: 5