• + 0 comments

    In the Except block, You are trying to find the minimum value of the list. But you forgot one condition. What if your testcase has few elements with same number of occurance. For example,

    X = [1,11,3,4,4,5,5,7,7,50]

    Here, 4,5,7 all these three elements have same number of occurance.

    We need to print the 4. But your program prints 1.