So right now I have a list of file names. I want to print them without the space after the comma and without quotation marks.
So basically I have a file that has the following output:
['1', '2', '3']
And I want the output to be
1,2,3
So right now I have a list of file names. I want to print them without the space after the comma and without quotation marks.
So basically I have a file that has the following output:
['1', '2', '3']
And I want the output to be
1,2,3
Use the join
method.
>>> your_list = ['1', '2', '3']
>>> print(', '.join(your_list))
1, 2, 3