类型错误:input()不接受关键字参数[重复]

问题描述 投票:0回答:1
workouts=int(input("How many workouts do you have data for?\n"))
a=0
b=0

for i in range(workouts):
    sets=int(input("How many sets were completed in workout #",a,"?\n", sep=""))

我正在尝试创建一个 for 循环,该循环运行我指定的锻炼量,然后询问我会做多少组。但是,我却收到输入错误。

python typeerror python-idle
1个回答
0
投票

输入需要 + str(var),在这种情况下不能使用逗号

© www.soinside.com 2019 - 2024. All rights reserved.