So let's say I have two variables, var and text. I would like to know how I could change the value of text depending on what var is equal to.
For example, i receive var and it's value is "this". I would then like text to get the value 1. If var is then equal to "that", text would then be equal to 2.
I would like not to use if ... elif as there could be quite a lot of values.
Sorry for my english, I could try to re-explain if it's not clear
if..else?