Python | Check if a given object is list or not
Given an object, the task is to check whether the object is list or not.
Method #1: Using isinstance
your object is a list ! your object is not a list
Method #2: Using
your object is a list your object is not a list
Attention geek! Strengthen your foundations with the Python Programming Foundation Course and learn the basics.
To begin with, your interview preparations Enhance your Data Structures concepts with the Python DS Course. And to begin with your Machine Learning Journey, join the Machine Learning – Basic Level Course