Quantcast
Channel: Active questions tagged string-manipulation - Mathematica Stack Exchange
Viewing all articles
Browse latest Browse all 186

How to replace numbers by letters in a special way?

$
0
0

There are few sublists:

lists = {{0,0,0}, {0,0,1}, {0,1,0}, {0,1,1}, {1,0,0}, {1,0,1}, {1,1,0}, {1,1,1}}

The goal is to put A if the first element of a sublist is 1, B if the second element of a sublist is 1, C is the third element of a sublist is one, 1 if all elements of a sublists equals to 0. So the result should be:

{1, C, B, BC, A, AC, AB, ABC}

Honestly, I don't even know how to approach this problem. So I would be happy if you help me tackle it.


Viewing all articles
Browse latest Browse all 186

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>