👻 Check our latest review to choose the best laptop for Machine Learning engineers and Deep learning tasks!
I"m pretty new to Python and am completely confused by .join()
which I have read is the preferred method for concatenating strings.
I tried:
strid = repr(595)
print array.array("c", random.sample(string.ascii_letters, 20 - len(strid)))
.tostring().join(strid)
and got something like:
5wlfgALGbXOahekxSs9wlfgALGbXOahekxSs5
Why does it work like this? Shouldn"t the 595
just be automatically appended?
👻 Read also: what is the best laptop for engineering students?
We hope this article has helped you to resolve the problem. Apart from What exactly does the .join() method do?, check other array Python module-related topics.
Want to excel in Python? See our review of the best Python online courses 2023. If you are interested in Data Science, check also how to learn programming in R.
By the way, this material is also available in other languages:
- Italiano What exactly does the .join() method do?
- Deutsch What exactly does the .join() method do?
- Français What exactly does the .join() method do?
- Español What exactly does the .join() method do?
- Türk What exactly does the .join() method do?
- Русский What exactly does the .join() method do?
- Português What exactly does the .join() method do?
- Polski What exactly does the .join() method do?
- Nederlandse What exactly does the .join() method do?
- 中文 What exactly does the .join() method do?
- 한국어 What exactly does the .join() method do?
- 日本語 What exactly does the .join() method do?
- हिन्दी What exactly does the .join() method do?
Berlin | 2023-03-23
Maybe there are another answers? What What exactly does the .join() method do? exactly means?. I am just not quite sure it is the best method
Milan | 2023-03-23
Maybe there are another answers? What What exactly does the .join() method do? exactly means?. I am just not quite sure it is the best method
New York | 2023-03-23
I was preparing for my coding interview, thanks for clarifying this - What exactly does the .join() method do? in Python is not the simplest one. I just hope that will not emerge anymore