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

    2019/09/02 点击:41753

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

  • Decorators

    2019/11/15 点击:34810

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

  • 递归

    1970/01/01 点击:45080

  • 递归函数

    1970/01/01 点击:30188

  • 递归函数

    1970/01/01 点击:30330

  • Sets

    1970/01/01 点击:5530

  • Sets

    1970/01/01 点击:33143

  • 集合

    1970/01/01 点击:27773

  • 数据结构

    1970/01/01 点击:20036

  • 迭代器

    2019/09/02 点击:35191

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