Created
April 21, 2015 12:07
-
-
Save berdario/eba432153633777f5811 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
>>> raw_assessments = [('sslyze', ('ssl', 'infra')), ('nmap common', ('infra', ))] | |
>>> from collections import defaultdict | |
>>> types = defaultdict(set) | |
>>> for (name, _types) in raw_assessments: | |
... for t in _types: | |
... types[t].add(name) | |
... | |
>>> types | |
defaultdict(<class 'set'>, {'ssl': {'sslyze'}, 'infra': {'sslyze', 'nmap common'}}) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment