Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- {'abc':'AGCTAC', 'def': 'AGGTAC', 'ghi':'AGGTAG'}
- (('A','A','A'),('G','G','G'),('C','G','G'))
- >>> d = {'abc':'AGCTAC', 'def': 'AGGTAC', 'ghi':'AGGTAG'}
- >>> zip(*d.values())
- [('A', 'A', 'A'), ('G', 'G', 'G'), ('C', 'G', 'G'), ('T', 'T', 'T'), ('A', 'A', 'A'), ('C', 'G', 'C')]
- >>> tuple(zip(*d.values()))
- (('A', 'A', 'A'), ('G', 'G', 'G'), ('C', 'G', 'G'), ('T', 'T', 'T'), ('A', 'A', 'A'), ('C', 'G', 'C'))
- >>> from collections import Counter
- >>> Counter(zip(*d.values()))
- Counter({('A', 'A', 'A'): 2, ('C', 'G', 'G'): 1, ('G', 'G', 'G'): 1, ('T', 'T', 'T'): 1, ('C', 'G', 'C'): 1})
Add Comment
Please, Sign In to add comment