-7

I am new to python. Are there other ways to print lists for example

li1 = ['This is one sentence. ' 'This is another.']
print(...)

And then the output would be :

This is one sentence. This is another.
Samrath
  • 29
  • 1
  • 1
  • 6

2 Answers2

2

You can unpack the list

print(*l)

and choose the separator in between elements.

print(*l, sep=', ')
1

Or try something like print(''.join(li1))

theEpsilon
  • 1,800
  • 17
  • 30