string % dictionary question

Sam Sungshik Kong ssk at
Tue Sep 14 02:10:33 CEST 2004

Hello, group!

>>> di={}
>>> di["test"]=None
>>> s="%(test)s" % di
>>> s

I want the result to be just empty string when the dictionary value is None.
Is there a good way?


More information about the Python-list mailing list