A question about yield

chad cdalten at gmail.com
Sun Nov 7 18:37:54 CET 2010


On Nov 7, 9:34 am, chad <cdal... at gmail.com> wrote:
> I have an input file named 'freq' which contains the following data
>
> 123 0
>
> 133 3
> 146 1
> 200 0
> 233 10
> 400 2
>
> Now I've attempted to write a script that would take a number from the
> standard input and then
> have the program return the number in the input file that is closest
> to that input file.

*and then have the program return the number in the input file that is
closest to the number the user inputs (or enters).*



More information about the Python-list mailing list