[Tutor] neat join
Vincent Gulinao
vincent.gulinao at gmail.com
Mon Oct 24 11:37:04 CEST 2005
is there any simple syntax for joining strings such that if any (or all) of
the params is white space or None, it won't be included in the resulting
string?
e.g. str1, str2, str3 = "foo", "bar", None, if delimiter is " " would result
to "foo bar"; str1, str2 = None, None would result to None.
TIA.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.python.org/pipermail/tutor/attachments/20051024/02a5fc46/attachment.html
More information about the Tutor
mailing list