Skip to navigation
How to get the length from the longest sublist in a python list
27.12.13
l = [['B', 1], ['C', 2], ['D', 2], ['A1', 2], ['B1', 4], ['B2', 4], ['B3', 4]] list_length = len(max(l, key=len))
Reply
Anonymous
Information Epoch 1746886992
Design for simplicity, add complexity only where you must.
Home
Notebook
Contact us