more_itertools.interleave(*iterables)[source]
Return a new iterable yielding from each iterable in turn, until the
shortest is exhausted.
>>> list(interleave([1, 2, 3], [4, 5], [6, 7, 8]))
[1, 4, 6, 2, 5, 7]
For a version that doesn’t terminate after the shortest iterable is
exhausted, see in
This is sometimes a nice function to have. For example, Haskell has a
similar function:
https://hackage.haskell.org/package/base-4.18.0.0/docs/Data-List.html#v:intercalate
that I use in real code every once in a while.
But I don't think you need to stick this function in the standard library.
A th
Samuel Muldoon writes:
> Python's `str` class has a method named `join`
>
> I was wondering if a future release of python could have a `list.join`
> which behaves in a similar fashion.
>
> result = [99].join([1, 2, 3])
> print(result)
> # prints [1, 99, 2, 99, 3]
I wouldn't call that an
To Whom it May Concern,
Python's `str` class has a method named `join`
I was wondering if a future release of python could have a `list.join`
which behaves in a similar fashion.
*result = [99].join([1, 2, 3])print(result)# prints [1, 99, 2, 99, 3]*
*Samuel Muldoon*
*(720) 653 -2408*
*muldo
> add multi-line commenting to the Python programming language
Python uses docstrings for multi-line comments.
> add capability to optimize for database access and usage
Do you have an example of a concrete "capability to optimize for database
access and usage"? What does that mean? How would it
Hello,
I am a Computer Science student at Oregon State University and would like
to submit some ideas/feature requests for the Python programming language
as part of a project for an Open Source Software course I am taking. I am a
subscriber to the Python-Ideas mailing list.
1) The first idea/fea