It's ambiguous whether you are using Python 2 or 3. You tagged Python 3, but in this case you should be getting a TypeError instead of semantically incorrect output. This answer works for both versions of Python.
test is a list of strings, but you want to do integer comparisons.
Build a list of integers first, then apply your algorithm.
>>> test = ['135', '2256', '1984', '3985', '1991', '1023', '1999']
>>> test_ints = [int(x) for x in test] # or test_ints = map(int, test)
>>> for i in test_ints:
... if i > 1000:
... print(i)
... elif i < 2000:
... print(i)
...
135
2256
1984
3985
1991
1023
1999
Now the code runs, but still has bugs. Note how 135 is falsely printed, because it is not greater than 1000 but smaller than 2000.
A bug free version could look like this:
>>> for i in test_ints:
... if 1000 < i < 2000:
... print(i)
...
1984
1991
1023
1999
... and if you want to build a list instead of just printing the filtered elements, create an empty list and append the hits.
>>> result = []
>>> for i in test_ints:
... if 1000 < i < 2000:
... result.append(i)
...
>>> result
[1984, 1991, 1023, 1999]
If you are already comfortable with list comprehensions, the shorter version to write this looks like this:
>>> result = [i for i in test_ints if 1000 < i < 2000]
>>> result
[1984, 1991, 1023, 1999]
Alternatively, the conversion to int could be done on the fly by mapping the int builtin onto your original list test inside a single comprehension.
>>> result = [i for i in map(int, test) if 1000 < i < 2000]
>>> result
[1984, 1991, 1023, 1999]
Personally, I prefer the last solution for its brevity.
TypeError: unorderable types: int() < str()in python 3, isn't this python 2?