'''L i s a list of ints that are >= -1. Return the minimum value in L that is >-1. If L doesn't have any value in it other than -1, return -1.'''
ans = -1 for n in L: if n> -1: if ans == -1: <------------?? Can someone explain why they are doing this. Isn't ans already equal -1?? Thus processing ans = n every time?? ans = n else: ans = min(ans, n) return ans
ANYHELP WOULD BE GREATLY APPRECIATED.