This is a silly question, but I can’t figure it out so I had to ask.
I’m editing some Python code and to avoid getting too complicated, I need to be able to define a new variable along the lines of : Car.store = False.
Variable Car has not been defined in this situation. I know I can do dicts (Car[‘store’] = False) etc… but it has to be in the format above.
Appreciate any help
Thanks.
I think the closest you can get to what you want is by adding one extra line (assuming you have defined a class called Car):
Without the first line you will get an error.
If you want brevity you could set
storetoFalsein__init__so that only the first line is necessary.