0

Perforan x+y+"some strings".... vs "{}{}some strings".format(x,y.....)

what is the best and fast way to concatenate strings?

28th May 2017, 7:09 PM
Gytree
Gytree - avatar
1 Answer
+ 5
Those are different operations, with the first one actually being a concatenation alright, while the second one is just formatting the display output. Not that I know, but I would bet that formatting is quicker as no actual __add__ operation is done underneath.
28th May 2017, 8:20 PM
Kuba SiekierzyƄski
Kuba SiekierzyƄski - avatar