Is there any nice way to unpack a list of unknown size??

Discussion in 'Python' started by srinivasan srinivas, Sep 14, 2008.

  1. I want to do something like below:

    1. first, second, third, *rest = foo

     2. for (a,b,c,*rest) in list_of_lists:

    Please suggest.

    Thanks,
    Srini


    Bring your gang together. Do your thing. Find your favourite Yahoo! group at http://in.promos.yahoo.com/groups/
     
    srinivasan srinivas, Sep 14, 2008
    #1
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. DeadInPlastic
    Replies:
    1
    Views:
    817
    Karl Heinz Buchegger
    Jun 26, 2003
  2. Gary Herron
    Replies:
    2
    Views:
    329
    Tim Chase
    Sep 14, 2008
  3. Chris Bardon

    Is there a nice way to dynamically call a web service?

    Chris Bardon, Apr 29, 2004, in forum: ASP .Net Web Services
    Replies:
    1
    Views:
    155
    Andrew Hopper
    Apr 29, 2004
  4. Kenneth McDonald

    Any nice way to get a temporary directory?

    Kenneth McDonald, Oct 23, 2008, in forum: Ruby
    Replies:
    7
    Views:
    185
    Nobuyoshi Nakada
    Oct 24, 2008
  5. Replies:
    5
    Views:
    360
Loading...

Share This Page