I am trying to create a tuple and export the tuple as entries in a CSV file. The inputs to the tuple include book titles (some of which include commas in the title), book price and availability. These commas in the title create separate entries in the CSV file, creating 4 entries instead of the proper 3.
saveMetaDataBooks = open('C:\\Users\\xxx\\Desktop\\booksMetaData.csv','a')
book_title = 'The Coming Woman: A Novel Based on the Life of the Infamous Feminist, Victoria Woodhull'
book_price = 17.93
book_stock = 'In stock'
book_tuple = book_title, book_price, book_stock
saveMetaDataBooks.write(str(book_tuple).replace("'",'').replace('(','').replace(')',''))
Is there a way to fix this issue?