%% Index into Python String
% This example shows how to display the first character of a Python® str variable. The example compares indexing into a MATLAB® character vector with indexing into the Python variable.
% Create a MATLAB character vector and display the first character.

str = 'myfile';
str(1)

%
% Convert the character vector to a Python str type and display the first character.

pstr = py.str(str);
pstr(1)

%
% Copyright 2012 The MathWorks, Inc.