Skip to main content
 首页 » 编程设计

python之在函数调用中使用 * 运算符

2025年05月04日13lori

<分区>

我对在 random.randint() 中使用 * 感到困惑,找不到任何文档

random.randint( *(1,300) ) 

对比

random.randint( 1,300 ) 
 
random.randint( *300 ) 
TypeError: randint() argument after * must be a sequence, not int