Advertisement
rfmonk

itertools_repeat_imap.py

Jan 16th, 2014
104
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.14 KB | None | 0 0
  1. #!/usr/bin/env python
  2.  
  3.  
  4. from itertools import *
  5.  
  6. for i in imap(lambda x, y: (x, y, x * y), repeat(2), xrange(5)):
  7.     print '%d * %d = %d' % i
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement