TheSaint <[EMAIL PROTECTED]> writes: > # Filling the c with the list of devices which are recorded to be mounted > > d = filter((lambda a: a[:2] =='/d'),mnt.readlines()) # non /dev-mounts are > off > d = map((lambda a: a.split()[:1]),d) # only the first info column is used
Just focusing one one detail: 1. you don't need the parens around the lambda 2. you can just write the above as d = [a.split()[:1] for a in mnt if a.startswith('/d')] 'as -- http://mail.python.org/mailman/listinfo/python-list