Python: how to add spaces between strings -
to more specific, i'm trying print several results of function in form of sentence print str(function(first)) + str(function(second)) + str(function(third))
, on, i've come across problem there no spaces between individual strings.
so, want know how add spaces between each of strings.
use join()
print " ".join([str(function(first)), str(function(second)), str(function(third))])
Comments
Post a Comment