got it.... thanks a lot

On Wed, Apr 11, 2012 at 4:59 PM, Jerry Hill <malaclyp...@gmail.com> wrote:

> On Wed, Apr 11, 2012 at 9:50 AM, Khalid Al-Ghamdi <emailkg...@gmail.com>
> wrote:
> > Hi All,
> >
> > I'm using python 3.2 on a windows xp.
> >
> > I wrote the below script and ran it with the hope of returning a list of
> > proctors (list_proc), but when it runs it  doesn't call the function
> > convert_proctors() as intended. On the other hand, when i import the
> module
> > from the IDLE prompt and call the convert_proctors() function, the
> function
> > returns the desired list.
> >
> > Why is this so?
>
> When you run that code as a script, it does call your
> convert_proctors() function.  But since all you do is create a list,
> and you never save it to disk, or print it to the screen, or even
> assign it to a variable, the result is just thrown away.  Try changing
> the last line to:
>
> print(convert_proctors())
>
> and you'll see the results you were expecting.
>
> --
> Jerry
> _______________________________________________
> Tutor maillist  -  Tutor@python.org
> To unsubscribe or change subscription options:
> http://mail.python.org/mailman/listinfo/tutor
>
_______________________________________________
Tutor maillist  -  Tutor@python.org
To unsubscribe or change subscription options:
http://mail.python.org/mailman/listinfo/tutor

Reply via email to