Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #98707

Why does 'as' not recognized?

X-Received by 10.13.204.19 with SMTP id o19mr13862301ywd.7.1447348802506; Thu, 12 Nov 2015 09:20:02 -0800 (PST)
X-Received by 10.50.142.39 with SMTP id rt7mr75766igb.7.1447348802425; Thu, 12 Nov 2015 09:20:02 -0800 (PST)
Path csiph.com!xmission!news.glorb.com!b51no193261qgf.0!news-out.google.com!l1ni2038igd.0!nntp.google.com!i2no881701igv.0!postnews.google.com!glegroupsg2000goo.googlegroups.com!not-for-mail
Newsgroups comp.lang.python
Date Thu, 12 Nov 2015 09:20:02 -0800 (PST)
Complaints-To groups-abuse@google.com
Injection-Info glegroupsg2000goo.googlegroups.com; posting-host=50.100.117.144; posting-account=SZ_svQkAAACWRFG2bDA-zgq8ILyl4-vo
NNTP-Posting-Host 50.100.117.144
User-Agent G2/1.0
MIME-Version 1.0
Message-ID <8ddbc8fd-ebdb-4cd2-8e3b-b0e1f5142e76@googlegroups.com> (permalink)
Subject Why does 'as' not recognized?
From fl <rxjwg98@gmail.com>
Injection-Date Thu, 12 Nov 2015 17:20:02 +0000
Content-Type text/plain; charset=ISO-8859-1
Xref csiph.com comp.lang.python:98707

Show key headers only | View raw


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

Back to comp.lang.python | Previous | NextNext in thread | Find similar | Unroll thread


Thread

Why does 'as' not recognized? fl <rxjwg98@gmail.com> - 2015-11-12 09:20 -0800
  Re: Why does 'as' not recognized? John Gordon <gordon@panix.com> - 2015-11-12 17:24 +0000

csiph-web