Skip to main content
 首页 » 编程设计

python之在不创建不会使用的变量的情况下在 python 中循环

2025年04月02日21emanlee

<分区>

这是我的代码:

def generate_float_population(count, size): 
    return [generate_float_individual(size) for item in range(count)] 

我的 IDE 说,没有使用变量“item”。我想知道是否有更优雅的方法来做到这一点。