Re: How to pass a method as argument?

2021-10-01 Thread Anil Anvesh
On Friday, October 1, 2021 at 6:04:34 AM UTC+5:30, Mats Wichmann wrote: > On 9/29/21 23:11, Anil Anvesh wrote: > > I want to write a python calculator program that has different methods to > > add, subtract, multiply which takes 2 parameters. I need to have an execute > &g

How to pass a method as argument?

2021-09-30 Thread Anil Anvesh
I want to write a python calculator program that has different methods to add, subtract, multiply which takes 2 parameters. I need to have an execute method when passed with 3 parameters, should call respective method and perform the operation. How can I achieve that? class calc(): def __