Welcome to Fer programes, a blog created with the intention to help us and other programmers in the developing of IT applications. It includes some commands used previously to solve specific problems, links to interesting web pages and general explanations about informatic topics. You are free to collaborate with comments when you consider it is oportune.
Monday, January 2, 2012
Python - How can I iterate through two lines?
You want the zip function.
a = [1,2,3] b = ['a','b','c'] for(n,l)in zip(a, b): print"num: ", n ,"; let: ", l