how to 'scanf' in python
aflinsch
avflinsch at att.net
Tue Mar 21 12:33:19 EST 2000
Shaun Hogan wrote:
>
> ok lads, im trying to figure our how to 'scanf' in python, but the code
> below isnt working properly, can anyone tell me what im doing wrong??
>
> def rl():
> line="how you doin"
> import sys
> line=sys.stdin.readline()
> x, y = string.split(line[:-1])
> x, y = int(x), int(y)
> print x,y
>
try
def rl():
line="how you doin"
import sys, string
line=sys.stdin.readline()
x, y = string.split(line[:-1])
x, y = int(x), int(y)
print x,y
More information about the Python-list
mailing list