How do I return objects in my class in Python?

Asked 2 years ago, Updated 2 years ago, 21 views

I'm using Python 3.6 I want to return the object of class A while executing function a in class A Is it possible?

python

2022-09-22 19:33

1 Answers

class A:
    def a(self):
        return self


2022-09-22 19:33

If you have any answers or tips


© 2024 OneMinuteCode. All rights reserved.