Jon Bowlas wrote:
I'm afraid I can't use Peters suggestion as I'm using python 2.3 and it doesn't have the collection module. Thanks anyway.
Python 2.3 is the reason. It doesn't support the generator expression syntax. Try sum([u'Level 2 Courses' in dct for dct in yourlist]) or len([1 for dct in yourlist if u'Level 2 Courses' in dct])
Christian -- http://mail.python.org/mailman/listinfo/python-list