I understand what you are saying that the () will eval and get precedence. Just the existence of the tuple yields TRUE. Is there a way like C where I can just use the element in question of the string (cmd[1]) and search in one line of code? (like above)...I have a bunch of commands and don't want to do a line of code for each especially when many times the commands are identical in response size. For instance D, S and R will all return 6 bytes....X, T, U, A, F, G may all return 8 bytes....Seems foolish to write a line of code for each command letter???
Thanks a bunch for the help!
This seems to work, although it is rather bloated looking
if ((cmd[1] == "S") or (cmd[1] == "D") or (cmd[1] == "R")):
I now see what you were saying....thank you!
if (cmd[1] in ("S", "D", "R")):