Python zip(): Difference between revisions
Jump to navigation
Jump to search
Line 3: | Line 3: | ||
=Overview= | =Overview= | ||
<code>zip()</code> "pairs" up the elements of a number of lists, tuples or other sequences to create a list of tuples. | <code>zip()</code> "pairs" up the elements of a number of lists, tuples or other sequences to create a list of tuples. It can also be used to [[Python_Language_Dictionary#From_a_Key_Sequence_and_a_Value_Sequence_with_zip()|create dictionaries from sequences and keys and values]]. |
Latest revision as of 17:20, 17 May 2024
Internal
Overview
zip()
"pairs" up the elements of a number of lists, tuples or other sequences to create a list of tuples. It can also be used to create dictionaries from sequences and keys and values.