Closed akindofyoga closed 5 years ago
Strings are immutable in Python. Therefore, concatenating strings within a loop creates a new string each time.
Using an array and concatenating after the loop ends fixes this problem. This example reads chunks from a socket this way.
Can someone approve this?
Strings are immutable in Python. Therefore, concatenating strings within a loop creates a new string each time.
Using an array and concatenating after the loop ends fixes this problem. This example reads chunks from a socket this way.