I have these values: unicode = ‘X’ unicode = ‘Y’ or unicode = ‘Z’
So I can to define a vector for each value of unicode: def value (unicode): … if unicode == ‘X’: … return (1,0,0) … elif unicode == ‘Y’: … return (0,1,0) … elif unicode == ‘Z’: … return (0,0,1)
But does it have a simpler way to do this? Preferably on one line?[SUB](If the answer is no I can understand.)