Three dumb questions (ordered by dumbness descending)

Jacek Generowicz jacek.generowicz at cern.ch
Tue Sep 24 10:55:46 EDT 2002


Steven Feil <sfeil at io.com> writes:

> Humm, what is is zip(), a function in the standard Python library or
> is it something you or someone else made up? I did a quick search in
> the Python docs and the only zip I found referred to zip
> compression. If this is something from the standard Python libraries
> please state the library it comes from.

  Python 2.2.1 (#3, Jun  4 2002, 09:56:27) 
  [GCC egcs-2.91.66 19990314/Linux (egcs-1.1.2 release)] on linux2
  Type "help", "copyright", "credits" or "license" for more information.
  >>> zip
  <built-in function zip>
  >>> print zip.__doc__
  zip(seq1 [, seq2 [...]]) -> [(seq1[0], seq2[0] ...), (...)]
  
  Return a list of tuples, where each tuple contains the i-th element
  from each of the argument sequences.  The returned list is truncated
  in length to the length of the shortest argument sequence.
  >>> 


or even


  > pydoc "zip"

Python Library Documentation: built-in function zip

zip(...)
    zip(seq1 [, seq2 [...]]) -> [(seq1[0], seq2[0] ...), (...)]
    
    Return a list of tuples, where each tuple contains the i-th element
    from each of the argument sequences.  The returned list is truncated
    in length to the length of the shortest argument sequence.



More information about the Python-list mailing list