import commands;
for each in str(commands.getstatusoutput("find / -perm +6000 -type f -print 2>/dev/null")[1]).split('\n'):
print each + '\n' + str(commands.getstatusoutput("ldd " + each)[1]) + '\n'
Returns a list of SUID/GUID programs that are dynamically linked, as well as the libs they link to