Is it possible to change the string list- and add letter 'y' to each element in the list:
lis = ['dan','jim','roky']
lis = ['dan','jim','roky']
p=map(lambda x: x+'y',lis)
Map is a built in function which takes first argument as the function and each of the next arguments are the iterator on which you want to iterate and update the value and returns list of result.
The lambda function is anonymous function which updates the value of elements lis.
For more info visit https://docs.python.org/2/library/functions.html