Use " " (a space) to insert a space before positive numbers and a minus sign before negative numbers: txt = "The temperature is between{: } and{: } degrees celsius." print(txt.format(-3, 7)) Output: The temperature is between-3 and 7 degrees celsius. How do I get the space inserted before the negative number -3 with the minus sign, if the txt is written the way I wrote it? Since the space is to insert a space before positive numbers and a minus sign before negative numbers. Continue reading...