I am working on Windows 7 in the Python shell (3.2.2). Trying to learn the language I introduced and returned the following:
>>> cast = { 'cleese', 'Palin', 'Jones', 'Idle' } >>> print (cast[1]) Traceback (most recent call last): File "<pyshell#12>", line 1, in <module> print (cast[1]) TypeError: 'set' object does not support indexing >>> cast.append('Gilliam') Traceback (most recent call last): File "<pyshell#13>", line 1, in <module> cast.append('Gilliam') AttributeError: 'set' object has no attribute 'append'
============================
It seems that the problem is not in coding, but in how the program was installed.
I installed, did not install, and installed again, but resutl is the same. Do I have to do something before the Python shell is ready to use?
Hans
source share