Generator Expressions : Zip : Buildin Function PYTHON examples


PYTHON examples » Buildin Function » Zip »

 

Generator Expressions


Generator Expressions

sum(i*i for i in range(10))                 # sum of squares

xvec = [102030]
yvec = [753]

print sum(x*y for x,y in zip(xvec, yvec))         # dot product

           
       



Leave a Comment / Note


 
Verification is used to prevent unwanted posts (spam). .


PYTHON examples

 Navioo Buildin Function
» Zip