Python Convert User Input To Interrupt