1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
#!/usr/bin/env python from __future__ import (absolute_import, division, print_function) __metaclass__ = type import grp gids = [g.gr_gid for g in grp.getgrall()] i = 0 while True: if i not in gids: print(i) break i += 1