In <[email protected]> fl 
<[email protected]> writes:

> >>> cats = ['Tom', 'Snappy', 'Kitty', 'Jessie', 'Chester']
> >>> 
> >>> type(cats)
> <type 'list'>
> >>> cats[2]
> 'Kitty'
> >>> as=cats[2]
> SyntaxError: invalid syntax
> >>> as=cats
> SyntaxError: invalid syntax
> >>> as
> SyntaxError: invalid syntax

'as' is a python language keyword, and cannot be used for variable names.

-- 
John Gordon                   A is for Amy, who fell down the stairs
[email protected]              B is for Basil, assaulted by bears
                                -- Edward Gorey, "The Gashlycrumb Tinies"

-- 
https://mail.python.org/mailman/listinfo/python-list

Reply via email to