ask user for names, add them to array and find length of array using loop
Answers
Answered by
9
def name_counter(names):
counter = 0
for name in names:
counter += 1
return counter
names = [name for name in input("enter names: ").split()]
print(f"No of names: {name_counter(names)}")
Similar questions