Post History
Vyxal, 62 bitsv2, ~8 bytes ẏḋ\.vȦ\|j Try it Online! Really 7.75 bytes, but leaderboard regex is a thing. Explained ẏḋ\.vȦ\|j ẏ # Range [0, len(X)) ḋ # n-length combinations...
Answer
#2: Post edited
# [Vyxal](https://github.com/Vyxal/Vyxal), 62 [bits<sup>v2](https://github.com/Vyxal/Vyncode/blob/main/README.md)</sup>, 7.75 bytes- ```
- ẏḋ\.vȦ\|j
- ```
- [Try it Online!](https://vyxal.pythonanywhere.com/?v=2#WyI9IiwiIiwi4bqP4biLXFwudsimXFx8aiIsIiIsIm1vb25cbjIiXQ==)
- ## Explained
- ```
- ẏḋ\.vȦ\|j
- ẏ # Range [0, len(X))
- ḋ # n-length combinations of X without replacement
- \.vȦ # for each combination c:
- # replace the item in X at each index in c with "." - basically double vectorised assignment
- \|j # join that on "|"s
- ```
- # [Vyxal](https://github.com/Vyxal/Vyxal), 62 [bits<sup>v2](https://github.com/Vyxal/Vyncode/blob/main/README.md)</sup>, ~8 bytes
- ```
- ẏḋ\.vȦ\|j
- ```
- [Try it Online!](https://vyxal.pythonanywhere.com/?v=2#WyI9IiwiIiwi4bqP4biLXFwudsimXFx8aiIsIiIsIm1vb25cbjIiXQ==)
- Really 7.75 bytes, but leaderboard regex is a thing.
- ## Explained
- ```
- ẏḋ\.vȦ\|j
- ẏ # Range [0, len(X))
- ḋ # n-length combinations of X without replacement
- \.vȦ # for each combination c:
- # replace the item in X at each index in c with "." - basically double vectorised assignment
- \|j # join that on "|"s
- ```
#1: Initial revision
# [Vyxal](https://github.com/Vyxal/Vyxal), 62 [bits<sup>v2](https://github.com/Vyxal/Vyncode/blob/main/README.md)</sup>, 7.75 bytes ``` ẏḋ\.vȦ\|j ``` [Try it Online!](https://vyxal.pythonanywhere.com/?v=2#WyI9IiwiIiwi4bqP4biLXFwudsimXFx8aiIsIiIsIm1vb25cbjIiXQ==) ## Explained ``` ẏḋ\.vȦ\|j ẏ # Range [0, len(X)) ḋ # n-length combinations of X without replacement \.vȦ # for each combination c: # replace the item in X at each index in c with "." - basically double vectorised assignment \|j # join that on "|"s ```