You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
(
Iter.open(filename)
.tee(
# This is the second iterator, provided to a callablelambdait: (
it
.map(str.lower)
.write_to_file("lower.txt")
)
)
# This continues with the original lines iterator
.map(str.upper)
.write_to_file("upper.txt")
)
The text was updated successfully, but these errors were encountered:
Need to understand carefully what runs when in examples like these. Should tee internally pass the second iterator into the callback, wait for that to return, and then yield? Not sure there's another way to do it.
Perhaps something like:
The text was updated successfully, but these errors were encountered: