J
J
Jungles2020-08-06 17:38:02
Python
Jungles, 2020-08-06 17:38:02

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)

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Araya, 2020-08-06
@Jungles

Read about constructors

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question