Avoid extra comma while importing a text file as a vector?

Hello everyone. I am currently having some issues using Import on a txt file which is a Python output.
When I import said file as a vector, a comma appears before one of the elements, making it impossible to work with said vector. I will adjoint images of my problem in case someone can aid me.

Thanks in advance.

Avoid extra comma while importing a text file as a vector?

Problem is caused by the \n (newline) characters. The Table format for Import uses \n to delimit rows. Can you modify the Python code to not insert a newline between [ ]? If not, probably best to use sed or awk to remove those newlines. You could also import as a string and munge it using WL. e.g.

import = Import["nodes.txt", "Text"];
string = import // StringReplace[{"\n" -> " ", "[" -> "{", "]" -> "}"}] // StringReplace[" " -> ","];
list = "{" <> string <> "}" // ToExpression