Loops/For with a specified step: Difference between revisions
Content added Content deleted
(→{{header|Python}}: Removed "One liner" by Shadowys as the task is to use a for loop..) |
|||
Line 872:
print "%d," % i,
print "who do we appreciate?"</lang>
{{works with|Python|3.x}}
<lang python>for i in range(2, 9, 2):
print("%d, " % i, end="")
print("who do we appreciate?")</lang>
{{out}}
<pre>2, 4, 6, 8, who do we appreciate?</pre>
|