Write a Python function to count number of lists in a list of lists


Topic: Write a Python function to count number of lists in a list of lists

Solution

def countList(lst): 
    count = 0
    for el in lst: 
        if type(el)== type([]): 
            count+= 1          
    return count 
	
	



List all Python Programs