This is an extension to my previous question but in a reversed order: that is, with string -t-c-over----, is there a way to generate a binary list that all valid letters have 1 and hyphens have 0:
[0, 1, 0, 1, 0, 1, 1, 1, 1, 0, 0, 0, 0]
- t - c - o v e r - - - -
I feel sorry for the back and forth but it has to go like this.