join
PYL-R1713Consider using str.join(sequence)
instead of joining the elements of a sequence using for
loop iteration.
str.join(sequence)
is faster, uses less memory and increases readability compared to a for
loop iteration.
my_string = ""
for element in data:
my_string += element
my_string = "".join(data)