I want to convert a list object into a string and insert this string as one row in mysql database. Can someone please provide a solution to this. My code looks like this:
If you want to convert a list into a string you can use join.
list
string
join
>>> myl = ['a','b','c'] >>> "".join(myl) 'abc'
you can use any delimiter of your choice in between the quotes
>>> myl = ['a','b','c'] >>> ",".join(myl) 'a,b,c'