Avoid using the addition "+" operator for string concatenation, as it is very expensive. Use str.join() instead.


@python_tips Extending the tip, "Efficient String Concatenation in Python": http://is.gd/fcupN


@python_tips @chendaniely is this because + has to check the type of both arguments first while join assumes they're strings?


United States 趋势
Loading...

Something went wrong.


Something went wrong.