String joining design - Page 3 - Python Discussions
Jan 2, 2023 ... You're joining strings with strings, using a string separator. Why are you surprised its a string method? It certainly shouldn't be just a list ...
Jan 2, 2023 ... You're joining strings with strings, using a string separator. Why are you surprised its a string method? It certainly shouldn't be just a list ...
Jul 20, 2022 ... ... function cannot split or join strings which would be needed to change their number. Moez (Moez) July 20, 2022, 12:43pm 6. ok, one more question:
Discussions related to the Python Programming Language, Python Community, and Python Software Foundation operations.
Dec 31, 2021 ... operators for performing arithmetic computations and string concatenation ... first Python command (or function, operator, statement ...
The '' makes an empty string. .join() calls a method on the string. A method is somewhat like a function, but attached to a specific object. The join() method of string objects concatenates strings with the string whose method is being called as the separator.
Discussions on Python.org. String concatenation with a for loop.The later function creates a new bigger string reducing drastically the performance of the string appending loop in the provided code. This appears to be related to the issue #89799 .
In Python, strings are immutable, which means they cannot be changed in place—the only way you can modify a string is by creating a brand new string object. Therefore, a string method like join cannot modify the string in place, but rather returns a new string.