Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Python > Is there any nice way to unpack a list of unknown size??

Reply
Thread Tools

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

 
 
srinivasan srinivas
Guest
Posts: n/a
 
      09-14-2008
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/
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Is there any way to decode String using unknown codec? howmuchistoday@gmail.com Python 5 06-28-2012 09:27 PM
Re: Is there any nice way to unpack a list of unknown size?? Gary Herron Python 2 09-14-2008 07:16 PM
501 PIX "deny any any" "allow any any" Any Anybody? Networking Student Cisco 4 11-16-2006 10:40 PM
Need better way to unpack a list Nx Python 3 08-17-2005 01:27 PM
is there a nice way to read consequtive integers from a character sting DeadInPlastic C++ 1 06-26-2003 01:09 PM



Advertisments