Element - Þǔ
- Untruth
Description
Return a list with 1s at the (0-indexed) indices in a, and 0s elsewhere
Overloads
any
-[int(x in a) for x in range(max(a))]
Examples
⟨1⟩ Þǔ
=⟨0|1⟩
⟨0|3|4|6⟩ Þǔ
=⟨1|0|0|1|1|0|1⟩
⟨⟨0|1|0⟩|⟨2|0|3⟩|⟨1|0|1⟩⟩ Þǔ
=⟨⟨⟨0|0|0|0⟩|⟨1|0|0|0⟩⟩|⟨⟨0|1|0|0⟩|⟨0|0|0|0⟩⟩|⟨⟨0|0|0|1⟩|⟨0|0|0|0⟩⟩⟩
⟨⟩ Þǔ
=⟨⟩
0 Þǔ
=⟨1⟩