13,420
edits
Changes
→PART 3 - String Formatting Advanced Features
print('{0:+.2f}'.format(number2))
print('{0:+.2f}\n{1:+.2f}'.format(number1, number2))
</source>In the event that the numbers being shown are all integers and do no require the decimal values, instead of using '''{:f}''',<br> use '''{:d}''' for decimal '''INTEGERSintegers'''.<br><br>
:#To demonstrate, issue the following:<source>
print('{0:d}'.format(number1))