>>> print map(lambda x:len(x),'Welcome To Beijing!'.split())
例16. 统计Linux系统挂载点
[root@host ~]# mount -v
/dev/mapper/rootVG-root on / type ext3 (rw)
proc on /proc type proc (rw)
sysfs on /sys type sysfs (rw)
devpts on /dev/pts type devpts (rw,gid=5,mode=620)
/dev/mapper/rootVG-tmp on /tmp type ext3 (rw)
/dev/mapper/rootVG-var on /var type ext3 (rw)
/dev/cciss/c0d0p1 on /boot type ext3 (rw)
tmpfs on /dev/shm type tmpfs (rw,size=90%)
>>> import commands
>>> mount = commands.getoutput('mount -v')
>>> lines = mount.splitlines()
>>> point = map(lambda line:line.split()[2],lines)
>>> print point
['/', '/proc', '/sys', '/dev/pts', '/tmp', '/var']