python check if int is in range