When combining a variable and a string to be printed in Python, there seem to be a number of ways to do the same thing;
test = "Hello" print "{} World".format(test) #Prints 'Hello World' print test+" World" #Prints 'Hello World' print "%s World" % test #Prints 'Hello World' What (if any) is the difference between these methods in terms of performance, compatibility and general preference. Even between open source projects all three methods seem to be used interchangeably.