 <p>I presume you want the strings instead of the numerical values, correct?</p> <pre><code>s = '' for j in range(30, 0, -1): s += "{}/{} + ".format(31-j, j) print s[:-2] </code></pre> <p>Read <a href="http://docs.python.org/3/library/string.html#format-string-syntax" rel="nofollow">this documentation</a> to get a grasp of it. Essentially, it's formatting the string, using the two pairs of curly braces as placeholders, and passing in the value 31-j in the first slot, and j in the second.</p> <p>Surely there is a more elegant way to do it, but this is the quick and dirty method.</p>