'I have a list like this x= [['a','b','c','d']] and I want to print all the elements in it like a b c d How do I do it?
I have a list like this
x = [['a','b','c','d']]
and I want to print all the elements in it like
a
b
c
d
Solution 1:[1]
x = [['a','b','c','d']]
print('\n'.join(map(str, x[0])))
result will be
a
b
c
d
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|---|
| Solution 1 | Mohammed Ibrahem |
