Why does 'as' not recognized?

fl rxjwg98 at gmail.com
Thu Nov 12 12:20:02 EST 2015


Hi,

When I try the following, python does not know 'as'. Why doesn't it?
Thanks,



>>> 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



More information about the Python-list mailing list