+ 1
Can you have a class inside a class?
For example: class Dog: def __init__(self, legs, teeth, Fur): self.legs = legs self.teeth = teeth class Fur: def __init__(self, color, length): self.color = color self.length = length then create Rusty: Rusty = Dog(4, "dull", Fur("brown", "short")) print(Rusty.Fur.color) I don't actually think that this code will run, but you get the idea...
1 Answer
+ 1
was my syntax close? it does not run.