var_a
(can be any variable name) should be replaced by its value:
var_a = "Hello"
var_b = "var_a world"
print var_b
Output should be: Hello world
var_a
(can be any variable name) should be replaced by its value:
var_a = "Hello"
var_b = "var_a world"
print var_b
Output should be: Hello world
That exactly fits the str.format
description. You need to wrap the "part of the string you want to replace" with curly braces:
var_a = "Hello"
var_b = "{var_a} world".format(var_a=var_a)
It's also possible to use it without "names":
var_b = "{} world".format(var_a)
That is called variable substitution. You can do it by using format characters string formatting / interpolation operator in python. The code you wrote above would not work as you are expecting it to work.
For example, if you want to get the output you want to with variable substitution, you can do something like:
var_a = "Hello"
var_b = "%s world" % var_a
print var_b
This will output Hello world.