Q:

Changing list of strings using python 2x

Is it possible to change the string list- and add letter 'y' to each element in the list:
lis = ['dan','jim','roky']

A:

Use list comprehension:
>>> [x + 'y' for x in lis]
['dany', 'jimy', 'rokyy']

