Oneliner:
print('\n'.join(' '.join(map(str,sl)) for sl in l))
Explanation:
you can convert list to str using the join function:
l = ['1','2','3'] ' '.join(l)
therefore, if you want to use linear characters, you must use a new line character.
But join only accepts a list of strings. To convert a list of things to a list of strings, you can use the str function for each item in the list:
l = [1,2,3] ' '.join(map(str, l)) # will return string '1 2 3'
And we apply this construct for every sl subexpression in the list l
ailin source share