When i run the below code in Python 2.6.6, i get a syntax error at for loop. However, it runs fine with no issues in Python 2.7.5
d.update({i: 'value' for i in d if i[-2:] in ('02', '05')})
What modification is needed for it to run in both the versions ?