IT入门 > 教程 >
  • 装饰器Decorators

    2019/09/02 点击:41744

    装饰器提供了一种使用其他函数修改函数的方法。 当您需要扩展不想修改的函数的功能时,这是理想的。 例如: def decor(func): def wrap(): print(============) func() print(============) return wrapdef

  • Decorators

    2019/11/15 点击:34804

    在前面的示例中,我们通过将包含函数的变量替换为包装版本来美化函数。 def decor(func): def wrap(): print(============) func() print(============) return wrapdef print_text(): print(Hello world!)print_text = dec

  • 递归

    1970/01/01 点击:45068

  • 递归函数

    1970/01/01 点击:30177

  • 递归函数

    1970/01/01 点击:30320

  • Sets

    1970/01/01 点击:5530

  • Sets

    1970/01/01 点击:33132

  • 集合

    1970/01/01 点击:27765

  • 数据结构

    1970/01/01 点击:20028

  • 迭代器

    2019/09/02 点击:35175

    模块迭代器是一个标准库,它包含几个函数在函数编程中是有用的。 它产生的一种函数是无限迭代器。 函数计数从一个值无限地计数。 函数循环通过迭代(例如列表或字符串)无限迭