How to fix an Empty output for STDERR?
<p>My program is working well and its printing the correct STDOUT but for STDERR I'm getting  ''Empty output stream''</p>

<p>can anyone fix my code?, I'm stuck here.</p>

<p>Input</p>

<pre><code>285 242 2053   260 310 450   10   682
</code></pre>

<p>Output</p>

<pre><code>207229
</code></pre>

<p>My code</p>

<pre><code>def sum_leaves(K, inputs, count=1):    
    A, B, M, L1, L2, L3, D, R = map(int, inputs)
    x = (((A*K)+B) % M)
    y = (((A*K)+2*B) % M)

    if K &lt; L1 or count == D:
        my_list.append(K)
    elif L1 &lt;= K &lt; L2:
        sum_leaves(x, inputs, count + 1)
    elif L2 &lt;= K &lt; L3:
        sum_leaves(y, inputs, count + 1)
    elif L3 &lt;= K:
        sum_leaves(x, inputs, count + 1)
        sum_leaves(y, inputs, count + 1)
    if count == 1:
        return sum(my_list)


def read_input(input_string):
    inputs = input_string.split()
    A, B, M, L1, L2, L3, D, R = map(int, inputs)
    x = (((A*R)+B) % M)
    y = (((A*R)+2*B) % M)

    if L1 &lt;= R &lt; L2:
        return sum_leaves(x, inputs)
    elif L2 &lt;= R &lt; L3:
        return sum_leaves(y, inputs)
    elif L3 &lt;= R:
        sum_leaves(x, inputs)
        return sum_leaves(y, inputs)

my_list = []
if __name__ == '__main__':
    print(read_input(input()))
</code></pre>