None is being returned
>>> print min([None, 1,2])
None
>>> None < 1
True
If you want to return 1 you have to filter the None away:
>>> L = [None, 1, 2]
>>> min(x for x in L if x is not None)
1
None is being returned
>>> print min([None, 1,2])
None
>>> None < 1
True
If you want to return 1 you have to filter the None away:
>>> L = [None, 1, 2]
>>> min(x for x in L if x is not None)
1