Printing all possible sums of two n-sided dice rolls
As @BenC mostly put a code dump, I'll explain ways that your code could have improved.



reverseIt

Programming this is just wrong in Python.
This is as there are two ways to do this.

&gt;&gt;&gt; list(reversed([1, 2, 3]))
[3, 2, 1]
&gt;&gt;&gt; [1, 2, 3][::-1]
[3, 2, 1]


As an alternate way to this you could just calculate the range backwards off the bat.

&gt;&gt;&gt; list(range(10, 0, -1))
[10, 9, 8, 7, 6, 5, 4, 3, 2, 1]


In short you could halve your code just by removing this.



If you wanted to keep it, then you would want to use the reversed range.
And do pretty much what you are now. To get:

def reverseIt(indexable):
    lst = []
    for index in range(len(indexable) - 1, -1, -1):
        lst.append(indexable[index])
    return lst


You could then use a list comprehension, if amount of lines dictates how good your code is.

def reverseIt(indexable):
    return [indexable[index] for index in range(len(indexable) - 1, -1, -1))]




allRolls


nums is pointless if you use a different algorithm. (Which is also more intuitive.)
index is never used.
retVal can be changed to a comprehension.
Manually counting cIndex is a frowned upon in Python.


In short, use a different algorithm.
The pseudo-code for this could be:

fn allRolls(sides):
    list = List()
    for dice1-face in dice-faces:
        for dice2-face in dice-faces:
            add dice1-face + dice2-face to list
    return sorted list


Or in Python:

fn allRoles(sides):
    ret = []
    for a in range(1, sides + 1):
        for b in range(1, sides + 1):
            ret.append(a + b)
    ret.sort()
    return ret


If you take it the next step then you would get @BenC's answer.



Misc

In short, you just used the wrong algorithm.

And in Python you should:


Use all_rolls instead of allRoles to follow function and variable naming conventions.
Have a space on both sides of operators, index &gt;= 0 or newb = [] to increase readability.