I've two list of string, I'm trying to append both list and would like to add pipe (|) delimiter at the end of string. Please find my code below:
firstList = ['Product1,item,,description,price|', 'Product2,item,,description,price|','Product3,item,,description,price|']
secondList = 'Product4,item,,description,price'
result = firstlist + secondList
result.append('|')
print result
I want to print my output like below:
Product1,item,,description,price|Product2,item,,description,price|Product3,item,,description,price|Product4,item,,description,price|
But my code is not appending the pipe delimiter property, its appending as a separate string value in the list. While appending new value in existing list I'm seeing blank space which I don't want.
Can someone please help to resolve this. It would be really helpful if someone can educate what's the efficient way of appending two list in python.
Thanks.