python: Check if all the elements in the list are only numbers

前端 未结 0 1263
刺人心
刺人心 2020-12-01 14:03

I want to check if all the elements in a list are only numbers. In string we can easily do it using isdigit() function but how can we do it in a list? For ex: i

相关标签:
回答
  • 消灭零回复
提交回复
热议问题