def parse_acl(acl_string):
 referrers = []
 groups = []
 if acl_string:
  for value in acl_string.split(','):
   if value.startswith('.r:'):
    referrers.append(value[len('.r:'):])
   else:
    groups.append(value)
 return (referrers, groups)

def parse_acl ( acl_string ) : referrers = [ ] groups = [ ] if acl_string : for value in acl_string . split ( ',' ) : if value . startswith ( '.r:' ) : referrers . append ( value [ len ( '.r:' ) : ] ) else : groups . append ( value ) return ( referrers , groups )
parses a standard swift acl string into a referrers list and groups list .