Znajdź długość zagnieżdżonej listy w Python
nestedList = [‘Krishna’, 20, ‘John’, [20, 40, 50, 65, 22], ‘Yung’, 11.98]
print(“\n Original List = “, nestedList)
print(“Length of a Nested List = “, len(nestedList[3]))
output:
Original List = [‘Krishna’, 20, ‘John’, [20, 40, 50, 65, 22], ‘Yung’, 11.98]
Length of a Nested List = 5
David Cao