0

How to reference another classes instance in a class in python3

For example, if I have a class for characters with attributes inside for age, height, profession etc, and I have a class for professions that contains name, description, etc, how do I say that the character class attribute "profession" should be an instance of the profession class?

5th Feb 2022, 6:53 PM
gingitsune182
gingitsune182 - avatar
2 Answers
+ 1
Hi ravilnicki thanks very much for this! Really appreciate your help!
9th Feb 2022, 3:31 PM
gingitsune182
gingitsune182 - avatar