more efficient?
Aahz
aahz at pythoncraft.com
Tue Jan 12 18:40:27 EST 2010
In article <4b3091b2$0$22916$e4fe514c at news.xs4all.nl>,
Irmen de Jong <irmen at -NOSPAM-xs4all.nl> wrote:
>
>Personally I'm only using the join-style-concat if I know the number of
>strings is rather large, or unknown. Otherwise I stick with just the
>regular string concatenation or string formattting (with % or format).
>Much more readable.
Generally speaking, I always use join() if I'm iterating and almost never
when not iterating. The performance-killer is concatenation in a tight
loop.
--
Aahz (aahz at pythoncraft.com) <*> http://www.pythoncraft.com/
"If you think it's expensive to hire a professional to do the job, wait
until you hire an amateur." --Red Adair
More information about the Python-list
mailing list