(Maybe b/c I'm from a C++ world) I want to verify some python variable is
list(string)
or list(dict(int, string))
or SomethingIterable(string)
Is there a simple and unified way to do it? (Instead of writing customized code to iterate and verify each instance..)
I emphasize that I understand in Python list
can have elements of different types, which is exactly the reason why I ask how to verify a list
which are composed by just a certain type e.g. string
.