D
D
Deni112019-07-10 18:34:53
Python
Deni11, 2019-07-10 18:34:53

How to call one object from another object?

class Primer:
      def ob1:
            print("Пример кода')
       def ob2:
       --------Тут запуск первого объекта------------

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Alexey Yarkov, 2019-07-10
@Deni11

class Primer:
    def ob1(self):
        print("Пример кода")
    def ob2(self):
        self.ob1()

primer = Primer()

primer.ob2()

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question