Re: Help counting the total number of dictionaries inside a listthat contain a specified key value

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Christian Heimes

    #1

    Re: Help counting the total number of dictionaries inside a listthat contain a specified key value

    Jon Bowlas wrote:
    For example I'd like to kow how many dictionaries there are with a
    level 1, 2 , 23 & 3 etc. How would one go about achieveing this?
    >
    Hope someone can help.
    sum(u'Level 2 Courses' in dct for dct in yourlist)

    Christian

Working...