Oct-31-2018, 02:30 PM
Hello and welcome to Python and the forums!
In Python, when you have begin and end index (such as in range/xrange, or in slicing iterables - iterable[2,4]), the item belonging to begin index is included in the result, while the item belonging to end index isn't. Therefore, if you want num2 to be included in the xrange, you'll need to provide it num2+1 as end index.
Next time when posting code, please use Python code tags.
In Python, when you have begin and end index (such as in range/xrange, or in slicing iterables - iterable[2,4]), the item belonging to begin index is included in the result, while the item belonging to end index isn't. Therefore, if you want num2 to be included in the xrange, you'll need to provide it num2+1 as end index.
Next time when posting code, please use Python code tags.