Reputation: 539
I have a list as below, may I know how do I convert to strings output?
Input
A = [['I', 'love', 'apple','.'],
['Today', 'is', 'Sunday', '.'],
['How', 'are', 'you'],
['What', 'are', 'you','doing']]
Output
I love apple.
Today is Sunday.
How are you
What are you doing
Upvotes: 1
Views: 119
Reputation: 4680
You can simply use a for
loop to iterate through each list nested in the list A
.
A = [
['I', 'love', 'apple.'],
['Today', 'is', 'Sunday.'],
['How', 'are', 'you'],
['What', 'are', 'you', 'doing']
]
for row in A:
print(' '.join(row))
Upvotes: 2