def hi(name="yasoob"):
    def greet():
        return "now you are in the greet() function"
    def welcome():
        return "now you are in the welcome() function"
    if name == "yasoob":
        return greet
    else:
        return welcome
a = hi()
print(a())

 

相关文章:

  • 2021-07-15
  • 2021-10-23
  • 2022-03-15
  • 2022-12-23
  • 2022-12-23
  • 2022-02-21
猜你喜欢
  • 2021-04-18
  • 2021-07-28
  • 2022-12-23
  • 2021-06-08
  • 2021-07-18
  • 2021-06-15
相关资源
相似解决方案