I have three lists and I am using printing the output using f-string formatting.
L = []
name = ['a', 'b', 'c']
dates = ['Jan', 'Feb', 'March']
event = ['Marriage', 'Office event', 'Birthday']
for a, b, c in zip(names, dates, event):
print(f'I met {a} on {b} at this {c}')
L.append(I met {a} on {b} at this {c})
How I am trying to insert the output to dataframe:
df = pd.DataFrame(L, columns=['string_values'])
print (df)
L.append(f"I met {a} on {b} at this {c}")[f'I met {a} on {b} at this {c}' for a,b,c in zip(names, dates, event)]