How to display name of elements in list?
Ant
antroy at gmail.com
Wed Jul 12 08:22:58 EDT 2006
> I'm using a badly documented module and therefore need to find out
> about how to access the elements in a list.
> (I need to do this in Python 1.5.3)
I presume this is the same in 1.5 use dir():
>>> import os
>>> dir(os)
['F_OK', 'O_APPEND', 'O_BINARY', 'O_CREAT', 'O_EXCL', 'O_NOINHERIT',
'O_RANDOM',
'O_RDONLY', 'O_RDWR', 'O_SEQUENTIAL', 'O_SHORT_LIVED', 'O_TEMPORARY',
'O_TEXT',
(etc)
More information about the Python-list
mailing list