Iterating over every two elements in a list
How do I make a for loop or a list comprehension so that every iteration gives me two elements? l = [1,2,3,4,5,6] for i,k in ???: print str(i), '+', str(k), '=', str(i+k) Output: 1+2=3 3+4=7 5+6=11 Answers: Thank you for visiting the Q&A section on Magenaut. Please note that all the answers may not help … Read more