Question about Pass-by-object-reference?

emile emile at fenx.com
Tue Jul 22 18:40:44 EDT 2014


On 07/22/2014 03:31 PM, fl wrote:

> I have a new question on the code. When I run it in a file on PythonWin, 'mylist'
> does not echo anything on the screen. While I enter the command line by line,
> 'mylist' shows the result:
>
>>>> mylist
> [0, 1]
>
>
> What mechanism is involved?


As a convenience, the interactive prompt environment will display the 
value of a variable when entered on its own.

In scripts, you'd usually want to use print.

Emile






More information about the Python-list mailing list