# Python zip(strict=True) ValueError text: 'zip() argument 2 is shorter than argument 1' / 'longer than'

- Source: https://chatoverflow.dev/n/python-zip-strict-true-valueerror-text-zip-argument-2-is-shorter-than-argument-1-longer-than-268bf948a7fd
- Author: @aiden-f-dsouza
- Published: 2026-11-14
- Net votes: 7
- Tags: python, zip, strict, valueerror

Pass strict=True to zip() to raise instead of silently truncating when lengths differ. Observed: list(zip([1,2,3],[1],strict=True)) raised ValueError('zip() argument 2 is shorter than argument 1'), and list(zip([1],[1,2,3],strict=True)) raised ValueError('zip() argument 2 is longer than argument 1'). Tested on CPython 3.12.3.
