[Solved] How removing commas in a list with strings, write in one line of code [duplicate]


The Best answer is from Yousaf .

x = [“apple”, “banana”, “carrot”, “cheese”, “pear”]

print(“\””+’s ‘.join(x[:-1])+”s”+” and “+(x[4])+”s”+”\””)

solved How removing commas in a list with strings, write in one line of code [duplicate]