+ 1

How can i call a function in another function ?

def l(): print("x") def j(): print("5") how can i call l in j?

26th Jul 2019, 5:34 AM
Sandip Dolai
Sandip Dolai - avatar
2 ответов
+ 2
def l(): print("x") def j(): l() print("5") j()
26th Jul 2019, 5:43 AM
Jake
Jake - avatar
+ 5
Calling a function from another function is done the same way as you would with just calling the function normally, so in this case you'd just need to add in the line l() somewhere within j and you should be good (but just remember to call j as otherwise it won't run)
26th Jul 2019, 5:39 AM
Faisal
Faisal - avatar