使用给定键比较两个Python列表
项目描述
概述
使用给定键比较两个Python列表
用法
listA = [3, 2, 1]
listB = [5, 4, 3]
inA, inBoth, inB = DiffUnsortedLists(listA=listA, listB=listB, keyA=lambda x: x, keyB=lambda x: x)
assert inA == [1, 2]
assert inBoth == [(3, 3)]
assert inB == [4, 5]
listA = [1, 2, 3]
listB = [3, 4, 5]
resultB = DiffListsByKey(iterA=iter(listA), iterB=iter(listB), keyA=lambda x: x, keyB=lambda x: x)
assert inA == [1, 2]
assert inBoth == [(3, 3)]
assert inB == [4, 5]
          项目详情
下载文件
为您的平台下载文件。如果您不确定选择哪个,请了解更多关于 安装软件包 的信息。
源代码分布
         listdiff-1.0.2.tar.gz  (3.0 kB 查看哈希值)
      
    构建分布
         listdiff-1.0.2-py3-none-any.whl  (3.3 kB 查看哈希值)
      
    
    
       关闭
    
      
        
    
    
  
listdiff-1.0.2.tar.gz的哈希值
| 算法 | 哈希摘要 | |
|---|---|---|
| SHA256 | 3a000f1087a2d02253d35a9fa25ab2c156df7608caf6da5220006ace9f5f990c | |
| MD5 | 816653b6758c8aeb1102982622569865 | |
| BLAKE2b-256 | 2e3d34635be44c0d0d2b519faf613ea52a18f964d6a591cb387e567bd1182a1c |