You can join strings together using several different
techniques:
a = 'foo' + 'bar' # join two strings
a = '%s%s' % ('foo','bar') # join two strings using string formatting
a = ''.join(['foo', 'bar']) # join a list of strings
Want to just stick stuff onto the end of a string? You can
also do:
Using join() and string formatting can be significantly
faster to use (you end up constructing fewer "throwaway"
strings in the process). You can experiment with the timeit
module to see the timing differences. In general it's
probably not a big deal, but if you are executing the code
very often (in, eg, a busy web site), every little bit helps.
In a desklet, though, I'm doubting you are going to squeeze
too much marginal performance out of how you choose to
concatenate strings. ;-)