how to 'scanf' in python

Adrian Eyre a.eyre at optichrome.com
Tue Mar 21 06:42:28 EST 2000


> def rl():
>     line="how you doin"
>     import sys
      import string		# might help
>     line=sys.stdin.readline()
>     x, y = string.split(line[:-1])
>     x, y = int(x), int(y)
>     print x,y

Works fine for me.





More information about the Python-list mailing list