Answer the question
In order to leave comments, you need to log in
How to pass the result of a function to another function, python?
How to pass the result of a function to another function, python ? preferably without any yelds and decorators
. The paths of data travel from one method to another, third, etc. are confused in my head
. I practice, set different tasks and try to complete ..
here is the code - https://jsbin.com/nitocu/edit?js
Answer the question
In order to leave comments, you need to log in
#coding:utf-8
class MyClass:
def __init__(self,x,y,z):
self.x=x
self.y=y
self.z=z
def calc_method(self,x,y,z):
return (x + y/z)
def printing_calc_result(calc_method):
print calc_method # - хочу показать результат подсчета а не показать то что это функция)
##########################################
root = MyClass(150,60,40)
root.printing_calc_result()
https://ru.wikipedia.org/wiki/Higher_order_function - works in python
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question