Thursday, 8 August 2013

python function to get the number of values read using input() function

python function to get the number of values read using input() function

In C language, the scanf() function will return the number of data read
into the variables. Is it possible to get the number of variables read
using input() function in python? for eg.
v = scanf("%d%d%d", &a, &b, &c);
returns the number of integer variable read using scanf() function. If the
three variable values are not integers it will return the value less than
three.

No comments:

Post a Comment