Conversion of integers to Roman numerals (python)
<p>I understand there were many similar questions being asked on this topic. But I still have some doubts need to be clear.</p>

<pre><code>def int_to_roman(input):

    if type(input) != type(1):
        raise TypeError, "expected integer, got %s" % type(input)
    if not 0 &lt; input &lt; 4000:
        raise ValueError, "Argument must be between 1 and 3999"   
    ints = (1000, 900,  500, 400, 100,  90, 50,  40, 10,  9,   5,  4,   1)
    nums = ('M',  'CM', 'D', 'CD','C', 'XC','L','XL','X','IX','V','IV','I')
    result = ""
    for i in range(len(ints)):
        count = int(input / ints[i])
        result += nums[i] * count
        input -= ints[i] * count
    return result
</code></pre>

<p>I dont really understand the code below:</p>

<pre><code>for i in range(len(ints)):
    count = int(input / ints[i])
    result += nums[i] * count
    input -= ints[i] * count
</code></pre>

<p>Does:</p>

<pre><code>for i in range (len(ints)):
</code></pre>

<p>it means '1000','900','800' (the integers respectively) or it means 13 (13 integers in integers)?</p>

<pre><code>count = int(input / ints[i])
</code></pre>

<p>what does ints [i] mean?</p>

<p>Anyone please explain these codes? It would be best if you could show the examples (like substitute numbers and show how it works)</p>