How do i get these Postal code characters together?
<p>So I am trying to generate postal codes in order but the output makes each character separate, is there a way to get them together?</p>

<pre><code>for first in range(10):
    for second in range(65,91):
        for third in range(10):
            for fourth in range(10):
                for fifth in range(65,91):
                    for sixth in range(10):
                        print(first,chr(second),third,fourth,chr(fifth),sixth)
</code></pre>

<p>use <a href="https://docs.python.org/2/library/stdtypes.html#str.format" rel="nofollow">.format</a></p>

<p>ex:</p>

<pre><code>a = 10
b = 11

'{}{}'.format(a,b)
</code></pre>

<p>outputs:</p>

<pre><code>1011
</code></pre>

<p>so:</p>

<pre><code>for first in range(10):
    for second in range(65,91):
        for third in range(10):
            for fourth in range(10):
                for fifth in range(65,91):
                    for sixth in range(10):
                        print('{}{}{}{}{}{}'.format(first,chr(second),third,fourth,chr(fifth),sixth))
</code></pre>

python loops scripting