+ 1

What is class (in python)?

What is your easiest explanation to class (in python) with or without example!?

18th May 2018, 5:44 PM
Dolan
Dolan - avatar
2 Antworten
+ 6
Python is an “object-oriented programming language.” This means that almost all the code is implemented using a special construct called classes. Programmers use classes to keep related things together. This is done using the keyword “class,” which is a grouping of object-oriented constructs https://www.hackerearth.com/practice/python/object-oriented-programming/classes-and-objects-i/tutorial/ https://www.sololearn.com/learn/Python/2467/
18th May 2018, 5:49 PM
Scooby
Scooby - avatar
+ 5
Easiest explanation is to think of it as a blueprint/template (class) that's used to create objects into the world. So if I have a blueprint of a house, I can use it to create multiple instances of that same design for a house. However, once I've built the houses, I could easily manipulate or change individual houses (objects) without affecting the others or affecting the blueprints I use to create more of them.
18th May 2018, 5:47 PM
Fata1 Err0r
Fata1 Err0r - avatar