<SYSTEM_TASK:>
Given the following text problem statement, write Python code to implement the functionality described below in problem statement
<END_TASK>
<USER_TASK:>
Problem:
I have a dataframe with one of its column having a list at each index. I want to reversed each list and concatenate these lists into one string like '3,2,1,5,4'. I am using
<ASSISTANT_TASK:>
Python Code:
import pandas as pd
df = pd.DataFrame(dict(col1=[[1, 2, 3],[4,5]]))
def g(df):
    for i in df.index:
        df.loc[i, 'col1'] = df.loc[i, 'col1'][::-1]
    L = df.col1.sum()
    L = map(lambda x:str(x), L)
    return ','.join(L)
result = g(df.copy())
<END_TASK>