New course! Every coder should learn Generative AI!
Try a free lesson0
How to iterate this dictionary in the this code???
3 Answers
+ 3
for k, v in a.__dict__.items():
print(k, v)
/best answer and a downvote, thanks!
+ 4
for k, v in vars(a).items():
print(repr(k), v)
+ 1
LOL
12-5=7 you're still in profit😁