%% Call Methods on Python Variables
% This example shows how to update a Python® list of folder names using the append method.
% Create a list of folders P using the Python sys.path variable.

P = py.sys.path;

%
% Display the Python functions for a list type.

methods(P)

%
% Read the documentation for append.

py.help('list.append')

%
% Add the current folder to the end of the path.

append(P,pwd)

%
% Display the number of folders on the path. The list has py.len elements. Your value might be different. The type of this number is py.int.

py.len(P)

%
% Copyright 2012 The MathWorks, Inc.