i have this code and when it raise exception i investigated and check

`max(xs) > 1000`

when `max(xs) = 'i'`

it evaluated to `True`

. I do not understand why and how. Please help me to understand this code. I got it online and needed to understand it well before i can use it .

Thanks in advance

```
def solution(xs):
maxNeg = -9999999
count = 0
countNeg = 0
res = str(int(1))
print res
print 'res type: ',type(res)
if len(xs) > 50 or len(xs) < 1 or max(xs) > 1000 or min(xs) < -1000:
raise ValueError("Invalid inputs")
solution([2, 0, 2, 'i'])
#solution([-2, -3, 4, -5])
```