python check if list
if isinstance(ini_list1, list):
print("your object is a list !")
else:
print("your object is not a list")
python check if list
if isinstance(ini_list1, list):
print("your object is a list !")
else:
print("your object is not a list")
how to check type inside a list in python
In [3]: lst = (1,2,3)
In [4]: all(isinstance(n, int) for n in lst)
Out[4]: True
In [5]: lst = (1,2,'3')
In [6]: all(isinstance(n, int) for n in lst)
Out[6]: False
Copyright © 2021 Codeinu
Forgot your account's password or having trouble logging into your Account? Don't worry, we'll help you to get back your account. Enter your email address and we'll send you a recovery link to reset your password. If you are experiencing problems resetting your password contact us