In this we are going to see a basic program on list comprehension and multiple Iterators in for loop in Python Programming Language.
list = [i for i in range(40) if i % 2 == 0]
print(list)
x = [(1, 2), (3, 4), (5, 6), (7, 8), (9, 10)]
for n1, n2 in x:
print(n1, "+", n2, "=", n1+n2)
#ENJOY CODING
Post a Comment
FOR ANY DOUBTS AND ERRORS FEEL FREE TO ASK. YOUR DOUBTS WILL BE ADDRESSED ASAP