How to print the sign + of a digit for positive numbers in Python.
- by systempuntoout
Is there a better way to print the + sign of a digit on positive numbers?
integer1 = 10
integer2 = 5
sign = ''
total = integer1-integer2
if total > 0: sign = '+'
print "Total:%s%d" % (sign, total)