When I run the following, I got the output as below:
x = [1, 2, 3, 4, 5]
print(type(x))
y = "PYTHON"
print(type(y))
Output:
<class 'list'>
<class 'str'>
I have read that everything in Python is a object
, yet I am seeing the output as class
. I also read that object
is a class
. How can an object be a class? I am beginner in python and was unable to understand this. Can you please help me?