We assign a list to variable and call it as object. Also we instantiate an object from a class and call it as an object. what is the difference between these two objects and how these objects are passed in a function for function call?
One is an instance of the list object and the other of a custom made object
- Ali
Objects are instances of classes. A list is an instance of the type list. If Foo is a class, then Foo() is an instance of the type Foo. I don't know what difference you might be looking for.
- chepner
A list is an object. There is a class for a Python list. When you create an instance of a list, you are instantiating the list class.
- h0r53
Are you having a specific issue with something? Please edit your question to include code that you are not understanding to better explain your problem.
- OneCricketeer
"what is the difference between these two objects and how these objects are passed in a function for function call?" None. Python only has a single evaluation strategy, the type of evaluation strategy never depends on the type of the object.
- juanpa.arrivillaga
We use cookies to ensure that we give you the best experience on our website. If you continue to use this site we will assume that you are happy with it.OkRead more
list. IfFoois a class, thenFoo()is an instance of the typeFoo. I don't know what difference you might be looking for. - chepner