If you want to make this shorter, you could write `if command_mode in [0, 4, 6, 8]:`