Communities

Writing
Writing
Codidact Meta
Codidact Meta
The Great Outdoors
The Great Outdoors
Photography & Video
Photography & Video
Scientific Speculation
Scientific Speculation
Cooking
Cooking
Electrical Engineering
Electrical Engineering
Judaism
Judaism
Languages & Linguistics
Languages & Linguistics
Software Development
Software Development
Mathematics
Mathematics
Christianity
Christianity
Code Golf
Code Golf
Music
Music
Physics
Physics
Linux Systems
Linux Systems
Power Users
Power Users
Tabletop RPGs
Tabletop RPGs
Community Proposals
Community Proposals
tag:snake search within a tag
answers:0 unanswered questions
user:xxxx search by author id
score:0.5 posts with 0.5+ score
"snake oil" exact phrase
votes:4 posts with 4+ votes
created:<1w created < 1 week ago
post_type:xxxx type of post
Search help
Notifications
Mark all as read See all your notifications »
Challenges

Post History

60%
+1 −0
Challenges Weave Strings Together

Python 3, 91 90 bytes Saved one byte thanks to Mark Giraffe in the comments lambda l:"".join(["".join(x)for x in zip_longest(*l,fillvalue='')]) from itertools import* Try it online!

posted 3y ago by celtschk‭  ·  edited 3y ago by celtschk‭

Answer
#2: Post edited by user avatar celtschk‭ · 2021-09-17T10:46:26Z (about 3 years ago)
Got rid of a whitespace character, spotted by @MarkGiraffe
  • # [Python 3], 91 bytes
  • <!-- language-all: lang-python -->
  • lambda l:"".join(["".join(x) for x in zip_longest(*l,fillvalue='')])
  • from itertools import*
  • [Try it online!][TIO-ktgv32kp]
  • [Python 3]: https://docs.python.org/3/
  • [TIO-ktgv32kp]: https://tio.run/##PY9BSsRAEEX3OUXRm0mGZjbuBrIQHXAhjAt3MUibdCel1V2hUxMyHsADeEQvEnuUDNTi8/7/UH84S8/hZnHly0LGv7UGaK/U7p0x5NUq5gIcR5gBA3zi8EocOjtKviXtkGgydLLlZlPUReYie0CxUZhpBPQDR9kukuKNGe0IJVQZQKU@MLDSqsFgvUnC84RW1frPbLi1iXVMbkUPmEC6597Ga@4wD2SCEeSwovuzIe7g9ukxhe9OJDj9@1odY9Ob2Ko6q7PsMkgug66v7VN/iBgkFw3q5@tbaXC5FMXyCw "Python 3 – Try It Online"
  • # [Python 3], <s>91</s> 90 bytes
  • Saved one byte thanks to [Mark Giraffe](https://codegolf.codidact.com/users/54114) in the [comments](https://codegolf.codidact.com/comments/thread/4511#comment-13630)
  • <!-- language-all: lang-python -->
  • lambda l:"".join(["".join(x)for x in zip_longest(*l,fillvalue='')])
  • from itertools import*
  • [Try it online!][TIO-kto8gsez]
  • [Python 3]: https://docs.python.org/3/
  • [TIO-kto8gsez]: https://tio.run/##PY9BSsRAEEX3OUXRm0mGZjbuBrIQHXAhjAt3MUibdCel1V2hUxMyHsADeEQvEnuUDNTi8/7/UH84S8/hZnHly0LGv7UGaK/U7p0x5NUq5sJxhBkwwCcOr8Shs6PkW9IOiSZDJ1tuNkVdZC6yBxQbhZlGQD9wlO0iKd6Y0Y5QQpUBVOoDAyutGgzWmyQ8T2hVrf/MhlubWMfkVvSACaR77m285g7zQCYYQQ4ruj8b4g5unx5T@O5EgtO/r9UxNr2JraqzOssug@Qy6PraPvWHiEFy0aB@vr6VBpdLUSy/ "Python 3 – Try It Online"
#1: Initial revision by user avatar celtschk‭ · 2021-09-12T06:54:44Z (about 3 years ago)
# [Python 3], 91 bytes

<!-- language-all: lang-python -->

    lambda l:"".join(["".join(x) for x in zip_longest(*l,fillvalue='')])
    from itertools import*

[Try it online!][TIO-ktgv32kp]

[Python 3]: https://docs.python.org/3/
[TIO-ktgv32kp]: https://tio.run/##PY9BSsRAEEX3OUXRm0mGZjbuBrIQHXAhjAt3MUibdCel1V2hUxMyHsADeEQvEnuUDNTi8/7/UH84S8/hZnHly0LGv7UGaK/U7p0x5NUq5gIcR5gBA3zi8EocOjtKviXtkGgydLLlZlPUReYie0CxUZhpBPQDR9kukuKNGe0IJVQZQKU@MLDSqsFgvUnC84RW1frPbLi1iXVMbkUPmEC6597Ga@4wD2SCEeSwovuzIe7g9ukxhe9OJDj9@1odY9Ob2Ko6q7PsMkgug66v7VN/iBgkFw3q5@tbaXC5FMXyCw "Python 3 – Try It Online"