objects in a list ...
Mark McEahern
marklists at mceahern.com
Mon Jul 15 08:41:25 EDT 2002
> I want to create many Objects of a class designed by my own and
> these objects should be
> stored/append in/on a list. Is this possible and how can I
> realize it? Thanx & Sorry for my bas
> englisch :-)
class Foo:
"""An empty class."""
pass
# Create a list.
foos = []
# Create some Foo instances and append them to the list.
for x in range(10):
f = Foo()
foos.append(f)
// m
-
More information about the Python-list
mailing list