Categories
Creating a class?
Sorry for the stupid question, I just can’t find the answer anywhere how to create a class so that you can pass arguments (or variable attributes)? more or less like this new_car = Car(model = Tesla, color = green)
new_car = Car(model = Tesla, color = green)
Answer the question
In order to leave comments, you need to log in
Read about constructors
Didn't find what you were looking for?
Ask a Question
731 491 924 answers to any question