Is there a funtion to find the length of array in python?
Sorry I am a very beginner in python.
Thanks for your help.
- Smith
>Solution :
use the len() function
arr = [1,2,3]
print(len(arr))
prints 3
len(s)
Return the length (the number of items) of an object. The argument may be a sequence (such as a string, bytes, tuple, list, or range) or a collection (such as a dictionary, set, or frozen set).