Convert User Input String Python Definition Function