Question about Pass-by-object-reference?
emile at fenx.com
Wed Jul 23 00:40:44 CEST 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:
> [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.
More information about the Python-list