Answers for "how to see how many items in a list"

2

how to check how many items are in a list python

list_a = ["Hello", 2, 15, "World", 34]

number_of_elements = len(list_a)

print("Number of elements in the list: ", number_of_elements)
Posted by: Guest on March-28-2021
2

how to check how many items are in a list python

def length(items):
    how_many = 0
    for i in items:
        how_many += 1
    return how_many
a = [8,59,69,49,78,4,7]
print(length(a))
Posted by: Guest on July-26-2021

Code answers related to "how to see how many items in a list"

Python Answers by Framework

Browse Popular Code Answers by Language