Python Function Input String Was Not In A Correct