scripts: elf_helper.py: Simplify tests with chained comparisons
scripts: elf_helper.py: Simplify tests with chained comparisons

'a < b and b < c' can be simplified to 'a < b < c' in Python.

Fixes this pylint warning:

    R1716: Simplify chained comparison between the operands
    (chained-comparison)

Fixing pylint warnings for a CI check.

Signed-off-by: Ulf Magnusson <01743f1c1deb1fe75271d62edb65757d98ac0bcb@nordicsemi.no>

Vudentz/zephyr,finikorg/zephyr,Vudentz/zephyr,zephyrproject-rtos/zephyr,zephyrproject-rtos/zephyr,galak/zephyr,nashif/zephyr,nashif/zephyr,galak/zephyr,nashif/zephyr,nashif/zephyr,finikorg/zephyr,zephyrproject-rtos/zephyr,galak/zephyr,zephyrproject-rtos/zephyr,nashif/zephyr,finikorg/zephyr,Vudentz/zephyr,Vudentz/zephyr,finikorg/zephyr,Vudentz/zephyr,finikorg/zephyr,galak/zephyr,galak/zephyr,zephyrproject-rtos/zephyr,Vudentz/zephyr