Wednesday, June 19, 2019

len(length) function in python

The number of elements can be determined with the len (length) function:

a=[0,1,2]

print(len(a))

output:



example 2:


a=[0,1,2,3,4]

print(len(a))

output:




No comments:

Post a Comment

python class topic video