Thanks Ian for the quick reply. I get the below error. NameError: name 'itertools' is not defined Thanks