I have three lists and I want to concatenate each element from each list.
Here is what I tried:
quantity_list = ['6','4',7]
product_list = ['Apple','Orange','Grape']
uom_list = ['kg','kg','kg']
order_list = ""
order_list_temp = []
for ind,product in enumerate(product_list):
order_list_temp.append(product + "-"+quantity_list[ind])
for ind,uom in enumerate(uom_list):
order_list += order_list_temp[ind]+uom+"\n"
The expected output is:
Apple-6kg
Orange-4kg
Grape-7kg
It works as I expected but I want to know is there any other better solution.