map( function, iterable)
pyuser@deyu:~/zzz$ cat function9.py
#!/usr/bin/python
xlist = [1, 2, 3, 4, 5, 6, 7, 8, 9]
squarelist = map(lambda x : x**2, xlist)
print("square of xlist:", squarelist)
pyuser@deyu:~/zzz$ ./function9.py square of xlist: <map object at 0x7f8335e4d208>
pyuser@deyu:~/zzz$ cat function9a.py
#!/usr/bin/python
xlist = [1, 2, 3, 4, 5, 6, 7, 8, 9]
squarelist = list(map(lambda x : x**2, xlist))
print("square of xlist:", squarelist)
pyuser@deyu:~/zzz$ ./function9a.py square of xlist: [1, 4, 9, 16, 25, 36, 49, 64, 81]