I have a set of lists similar to this one:

```
list = [datetime.datetime(1900, 1, 1, 16, 5), 'NA', 'NA', 'NA', 
    'NA', datetime.datetime(1900, 1, 1, 16, 49)]

```

I want to obtain the maximum value in each list without taking in consideration the `'NA'` values.

When I use the max() function I got following error:

> 
> TypeError: '>' not supported between instances of 'str' and 'datetime.datetime'
> 
> 
>