add helper function to create from-to-without ranges
use from_to_without
test case for from_to_without
Python3 compatibility