better python3 input handling