Skip to content

Instantly share code, notes, and snippets.

Created Jul 5, 2020
What would you like to do?
import itertools
#It will return square of numbers from 0 to 9.
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