I have a list, L1 = ['T51', 'T52']
. How can convert this into T51
, T52
and pass it to a variable?
Asked
Active
Viewed 1.0k times
2
-
1Use the `string.join()` method. – Barmar May 22 '17 at 18:21
-
@Barmar Thank you so much and thanks for the quick reply. – krishna May 22 '17 at 18:29
1 Answers
9
Try the built in join method. Like so:
L1 = ['T51', 'T52']
string = " ,".join(L1)

Douglas Tyler Gordon
- 569
- 3
- 10