I need to get results from one minus another in range numbers with python : <p>Hi i need to make a code to get a results betwen two numbers. I have start number 1000. I want to get all numbers from 1000 - 500 in a desired range like I give in example. </p>

<p>I need one number minus another than minus one more time and loop this in range of numbers. Like I give you in example.</p>

<p>1000 - 10 = 990 Than I need number 990 - 40 = 950 and all that in loop till 500. I need to have code to do this.  </p>

<pre><code>1000, 990
950, 940
900, 890
850, 840
800, 790
750, 740
700, 690
650, 640
600, 590
550, 540
</code></pre>

<p>I tried with this</p>

<pre><code>import math
x = 1000
y = 10
z = x-y
d = 40
print(x, z, sep=', ')
</code></pre>

<p>When I tried with range </p>

<pre><code>for x in range(1000, 500, -40):
    print(x)
</code></pre>

<p>I get this </p>

<pre><code>1000
960
920
880
840
800
760
720
680
640
600
560
520
</code></pre>

<p>I don't know how to mix this two and get what I need. Can someone to direct me how to do this?</p>
