3 ms·You could also do: "text {}".format(foo) Works in Python 3.5 and earlier ones too.by jxub 9y agoYou could also do: "text {}".format(foo) Works in Python 3.5 and earlier ones too.