scanf and getchar for python