-
-
Save IndhumathyChelliah/7039a67b3e41d1af3dfcf77182780ca4 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import itertools | |
#It will return square of numbers from 0 to 9. | |
l1=map(pow,range(10),itertools.repeat(2)) | |
print(l1)#Output:<map object at 0x011CEC10> | |
#iterate through map object using for loop | |
for i in l1: | |
print (i,end=" ") #Output:0 1 4 9 16 25 36 49 64 81 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment