def get_group_name_id(group):
 if re.match('\\d+', str(group)):
  group_info = grp.getgrgid(group)
 else:
  group_info = grp.getgrnam(group)
 return (group_info[0], group_info[2])

def get_group_name_id ( group ) : if re . match ( '\\d+' , str ( group ) ) : group_info = grp . getgrgid ( group ) else : group_info = grp . getgrnam ( group ) return ( group_info [ 0 ] , group_info [ 2 ] )
get the group id # and name .