What is the best way to read in a line of numbers from a file when they are presented in a format like this:

```
[1, 2, 3 , -4, 5]
[10, 11, -12, 13, 14 ]

```

Annoyingly, as I depicted, sometimes there are extra spaces between the numbers, sometimes not. I've attempted to use `CSV` to work around the commas, but the brackets and the random spaces are proving difficult to remove as well. Ideally I would append each number between the brackets as an `int` to a `list`, but of course the brackets are causing `int()` to fail.

I've already looked into similar solutions suggested with [Removing unwanted characters from a string in Python](https://stackoverflow.com/questions/2780904/removing-unwanted-characters-from-a-string-in-python/ "this") and [Python Read File, Look up a String and Remove Characters](https://stackoverflow.com/questions/19201575/python-read-file-look-up-a-string-and-remove-characters), but unfortunately I keep falling short when I try to combine everything.