How to display all var which been assigned to a class in python? | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 1

How to display all var which been assigned to a class in python?

i mean like this class student: def __init__(self,major,level): self.major=major srlf.level=level andy=student('science',10) july=student('social',11) so the result will something like this ['andy','july']

23rd Dec 2017, 3:13 AM
Ahmad Rafsanjani
Ahmad Rafsanjani - avatar
2 Answers
0
Sry but I don't understand what do you mean.
23rd Dec 2017, 11:15 AM
Ninj4
0
thank you that's all i can explain my english is bad
23rd Dec 2017, 12:41 PM
Ahmad Rafsanjani
Ahmad Rafsanjani - avatar