Answers for "write a program which print the length of the list?"

4

python list of size

li = [None] * 5 # [None, None, None, None, None]
li = [0] * 5 # [0, 0, 0, 0, 0]
Posted by: Guest on May-16-2020
0

from a list of lists - find all length of list

# max length of walks
len(max(walks, key=len))

# min length of walks
len(min(walks, key=len))

# mean lenght of walks
mean([len(l) for l in walks])
Posted by: Guest on February-12-2021

Code answers related to "write a program which print the length of the list?"

Python Answers by Framework

Browse Popular Code Answers by Language