histogram.py 文件源码

python
阅读 26 收藏 0 点赞 0 评论 0

项目:hgvm-builder 作者: BD2KGenomics 项目源码 文件源码
def filter2(criterion, key_list, other_list):
    """
    Filter two lists of corresponding items based on some function of the first
    list.

    """

    # Make the output lists
    out1 = []
    out2 = []

    for key_val, other_val in itertools.izip(key_list, other_list):
        # Pair up the items
        if criterion(key_val):
            # The key passed the filter, so take both.
            out1.append(key_val)
            out2.append(other_val)

    return out1, out2
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号