if I have a str and the I use str.index(char)
and the char does not exist, is it possible with one line to assign another char to the variable?
Maybe like this
str = "bar/foo"
t = str.index("_") | "Empty"
str
dosen't contain _ , so the string "Empty" should be assigned instead.