How to count numbers from a list of strings in Python

1 Answer

0 votes
lst = ["2", "99", "java", "34", "c++", "7", "python", "c", "890", "c#", "javascript"] 

total = len(list(i for i in lst if i.isdigit()))
  
print(total)
 
 
 
'''
run:
 
5
 
'''

 



answered Feb 18, 2024 by avibootz

Related questions

...