![]() ![]() By contrast, Python 3.10 will raise a ValueError. Until Python 3.9, if you are zipping two lists of unequal length, you would get the output with the length equal to the smaller list.Īs you can see in the following example, before Python 3.10, the zip() function ignored the unmatched 'D' in the first list. If you pass strict=True, the iterables that you are zipping must be of equal length, or else a ValueError will be raised. A new, optional keyword argument strict will be added to the zip function.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |