SyntaxFix
Write A Post
Hire A Developer
Questions
For python 3.6
class SomeClass: def attr_list(self, should_print=False): items = self.__dict__.items() if should_print: [print(f"attribute: {k} value: {v}") for k, v in items] return items