I don't know what you've got there. Presumably, you are familiar with the way vim handles NUL
characters (they are stored in memory as newlines, 0x0a, and show as ^@).
Have you tried chopping off the ends of the elements? Say,
:let my_list = ["alice", "bob", "carol"]
:call map(my_list, {k,v -> v[0:-2]})
:echo my_list
['alic', 'bo', 'caro']
HTH, John Little