Python solution to make lines of text in a file a JavaScript array