About 24,000,000 results
Open links in new tab
  1. Why does x,y = zip(*zip(a,b)) work in Python? - Stack Overflow

    I'm extremely new to Python so this just recently tripped me up, but it had to do more with how the example was presented and what was emphasized. What gave me problems with …

  2. Zip lists in Python - Stack Overflow

    23 In Python 3 zip returns an iterator instead and needs to be passed to a list function to get the zipped tuples:

  3. python - Difference between zip (list) and zip (*list) - Stack Overflow

    Mar 19, 2015 · zip([1,2,3],[4,5,6]) Also, note that since Python-3.5 you can use unpacking operators in a few other cases than in function callers. One of which is called in-place …

  4. python - Make a dictionary (dict) from separate lists of keys and ...

    In Python 3, zip now returns a lazy iterator, and this is now the most performant approach. dict(zip(keys, values)) does require the one-time global lookup each for dict and zip, but it …

  5. For loop and zip in python - Stack Overflow

    Q1- I do not understand "for x, y in zip (Class_numbers, students_per_class)". Is it like a 2d for loop? why we need the zip? Can we have 2d loop with out zip function? Q2-I am not …

  6. Python equivalent of zip for dictionaries - Stack Overflow

    Python equivalent of zip for dictionaries Asked 12 years, 8 months ago Modified 1 year, 6 months ago Viewed 67k times

  7. python - How to extract zip file recursively? - Stack Overflow

    zipfile.zip\ dirA.zip\ a dirB.zip\ b dirC.zip\ c I want to extract all the inner zip files that are inside the zip file in directories with these names (dirA, dirB, dirC). Basically, I want to end up with the …

  8. zip - Unzipping files in Python - Stack Overflow

    Aug 10, 2010 · I read through the zipfile documentation, but couldn't understand how to unzip a file, only how to zip a file. How do I unzip all the contents of a zip file into the same directory?

  9. Printing result of the zip() function in Python 3 gives "zip object at ...

    119 Unlike in Python 2, the zip function in Python 3 returns an iterator. Iterators can only be exhausted (by something like making a list out of them) once. The purpose of this is to save …

  10. python - How to create a zip archive of a directory? - Stack Overflow

    Dec 6, 2009 · 69 How can I create a zip archive of a directory structure in Python? In a Python script In Python 2.7+, shutil has a make_archive function.