grid = []
for _ in range(3):
grid.append(raw_input().split())
Input:
000
000
000
Output:
[['000'], ['000'], ['000']]
.
How do I change my code to get the output?
[['0','0','0'], ['0','0','0'],['0','0','0']]
You have:
"000".split() == ["000"]
You want:
list("000") == ["0", "0", "0"]
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With