Format Code Repeat Counts?

MRAB python at mrabarnett.plus.com
Fri Aug 14 13:39:50 CEST 2009


Scott David Daniels wrote:
> MRAB wrote:
>> The shortest I can come up with is:
>>     "[" + "][".join(letters) + "]"
> 
> Maybe a golf shot:
>       "][".join(letters).join("[]")
> 
Even shorter:

     "["+"][".join(letters)+"]"

:-)



More information about the Python-list mailing list