4 ms·
It may be necessary in python, but in general, a language could allow you to define a join method on the iterable superclasss/trait/interface that iterates over
by Someone 5y ago
It may be necessary in python, but in general, a language could allow you to define a join method on the iterable superclasss/trait/interface that iterates over the elements, converting each to a string, and inserting the separator between each of them.
For example, scala has Iterable#mkstring (https://docs.scala-lang.org/overviews/collections-2.13/trait-iterable.html#inner-main https://docs.scala-lang.org/overviews/collections-2.13/trait...)