Printing multiple objects without spaces
<p>I'm writing a basic program to convert any 4 digit number in reverse.</p>

<p>I know I'm taking a very complex approach, but that's what my professor requires. So far I've got:</p>

<pre><code>print("This program will display any 4-digit integer in reverse order")

userNum = eval(input("Enter any 4-digit integer: "))

num1 = userNum % 10

userNum2 = userNum // 10

num2 = userNum2 % 10

userNum3 = userNum // 100

num3 = userNum3 % 10

userNum4 = userNum // 1000

num4 = userNum4 % 10

print(num1,num2,num3,num4)
</code></pre>

<p>The issue I'm having is the output from the print statement gives me</p>

<pre><code>x x x x
</code></pre>

<p>When I would prefer to have</p>

<pre><code>xxxx
</code></pre>

<p>Any advice?</p>

<p>If you read the description of the <a href="https://docs.python.org/3.5/library/functions.html#print"><code>print()</code></a>, you can see that you can change your last line for:</p>

<pre><code>print(num1,num2,num3,num4, sep='')
</code></pre>

python printing reverse spaces