+ 1

[Python] What is the difference between an object and an instance?

I'm still a bit confused on that.

3rd Mar 2020, 9:40 PM
Mary Kate
Mary Kate - avatar
5 Answers
+ 4
I got this analogy from code academy but hopefully it helps. A blueprint for a house design is like a class description. All the houses built from that blueprint are objects of that class. A given house is an instance.
3rd Mar 2020, 10:08 PM
Austin
+ 3
Instance of a class is called as an object. Both same..
3rd Mar 2020, 10:04 PM
Jayakrishna 🇼🇳
+ 2
Thank you for the answers!
3rd Mar 2020, 10:54 PM
Mary Kate
Mary Kate - avatar
+ 2
Thanks, Geoffrey!
4th Mar 2020, 3:01 AM
Mary Kate
Mary Kate - avatar
+ 1
Object = Instance of a Class So yes an instance is an object. If you want to know who is the parent Class of an object you can use print( type( myVar ) ) For example: print(type(5)) output: int Some more informations: https://www.google.com/amp/s/www.geeksforgeeks.org/type-isinstance-JUMP_LINK__&&__python__&&__JUMP_LINK/amp/
3rd Mar 2020, 11:48 PM
Geoffrey L
Geoffrey L - avatar