Construct lists from other lists. : System Cmd Mount « System « Python






Construct lists from other lists.

Construct lists from other lists.

import commands

lines = commands.getoutput('mount -v').split('\n')
 
points = [line.split()[2] for line in lines]
print points


           
       








Related examples in the same category

1.Find all mount points in the file system.Find all mount points in the file system.
2.Use lambda function to find all mount points in our file system.Use lambda function to find all mount points in our file system.