KnowledgeHub
Questions
Tags
Users
Search
Alex Rivera
|
Logout
Edit Question
Title
Body
Say I have a list of numbers. How would I do to check that every item in the list is an int? I have searched around, but haven't been able to find anything on this. for i in myList: result=isinstance(i, int) if result == False: break would work, but looks very ugly and unpythonic in my opinion. Is there any better(and more pythonic) way of doing this?
Tags (comma-separated)
Save Edits
Cancel