By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
444,199 Members | 1,125 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 444,199 IT Pros & Developers. It's quick & easy.

Combine two lists

P: 1
Is this possible to zip or combine two different sized list?
Expand|Select|Wrap|Line Numbers
  1. >>list1 = [1, 2, 3]
  2. >>list2 = [4, 5, 6, 7, 8]
  3. >>zip(list1, list2)
  4. [(1, 4), (2, 5), (3, 6)]
  5.  
Oct 20 '11 #1
Share this Question
Share on Google+
1 Reply


bvdet
Expert Mod 2.5K+
P: 2,851
What do you expect the output to be?
Oct 21 '11 #2

Post your reply

Sign in to post your reply or Sign up for a free account.