Python

Python

Made by DeepSource

Consider using join PYL-R1713

Performance
Major
Autofix

Consider 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.

Bad practice

my_string = ""
for element in data:
    my_string += element

Recommended

my_string = "".join(data)