'Tkinter treeview wrap text only working in first row

I have referred the answer from this link Wrap text inside row in tkinter treeview

But it seems it is working only first row of records. When second row get added in treeview it is not sitting next to first row. first row and second row records overlapping. I am using for loop to add records in treeview.

def wrap(string, lenght=8):
    return '\n'.join(textwrap.wrap(string, lenght))

for i in list:
  tree.insert('','end',values=i,wrap(value))



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source