problems defining an empty list

Manuel Hendel manuel at hendel.net
Wed Sep 25 03:54:16 EDT 2002


On Wed, Sep 25, 2002 at 12:40:12AM -0700, Sean 'Shaleh' Perry wrote:
> it sounds like you have a hidden piece of whitespace.  Perhaps the code is 
> indented when it should not be?  If the code is not in a loop, class, if 
> structure, etc then it should not be indented.

Actually it is in a ... structure.
[....]
# empty list for lines per all domains
linesperdomains = []

for domain in domains:
    # empty list for lines
    domainlines = []
    for neededline in neededlines:
        if domain == neededline[0]:
            domainlines.append(neededline)
    print len(domainlines)

    # empty list for lines per domain
    linesperdomain = []
    linesperdomain = [domain, domainlines]
    print linesperdomain
[....]

This ist just a part of the script.

Manuel
-- 
I am two with nature. 
-Woody Allen 




More information about the Python-list mailing list