'How do add whitespace in between a word in python

Hi I am a newbiew learning python and i have a very simple question and can't seem to work it out.

I have built this little program and i was just wondering one thing.

print("Hello Sir !!!")
num1 = input("Enter a number: ")
num2 = input("Enter another Number: ")
result = float(num1) + float(num2)
print(result)
num3 = input("Enter your final Number: ")
result = float(num3) / (float(num1) + float(num2))
print("Your final total is:", result)
print("You are now finished")
print("Have an Amazing day!! ")

RESULT = Hello Sir !!! Enter a number: 50 Enter another Number: 50 100.0 Enter your final Number: 5 Your final total is: 0.05 You are now finished Have an Amazing day!!

Process finished with exit code 0

If i wanted to write "Your final total is:0.05" or "Your final total is:
0.05"

How would i move it closer or further away?

Thank you for your help today



Solution 1:[1]

You can do

print("Some string: " + variable) # Add a whitespace at the end of your string

if you have string with variable or

print(variable1 + ' ' + variable2)

If you need space between 2 variables or use \n if you need to make a newline

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 Leo