I can't figure the way to read from this file, only the integers:

```
34
-1
2 48
  +0
++2
+1
 2.4
1000
-0
three
-1  

```

The function should return:

```
[34, -1, 0, 1, -1]

```

If a number has `+` or `-` is valid. But if it has `++` or any letters is not.

If it has a space (as for example `2 48` ) is not valid.

If it is > 999 it is not valid.

I am stuck only at here:

```
my_list = []
with open('test.txt') as f:
    lines = f.readlines()
    for line in lines:
        my_list.append(line.strip())

```

I tried to make it a string and use punctuation using `translate` but I am not sure if it gets more complicated.

Also, I am not sure about using regex. I tried a simple regex but I don't have experience using it.